How do I add columns individually in a 2D array?
hi! i am reading out a CCD chip and generating 2D .txt files of the data. Howeverm I need to add up all the values from column 1,and write that value to a new file (starting a new column in a new .txt file). then i must add all of the val's from col. 2, and append that result to the new file etc etc until all the columns are added, and the results written to that new .txt file,which is then saved- How do I do the addition :-S
Cheers!
John
john-
you said you already have the 2D data in a text file, i guess some comma delimeted spreadsheet compatible file? labview has a "Read From Spreadsheet File" vi, and it should import your data right into a 2D labview array. then to sum up the columns, first you probably want to transpose that array, then wire it to a single FOR loop, enabling indexing.
the value that gets passed inside will be a 1D array that is a slice of the 2D array. wire that to a "Sum 1D Array" vi from the math menu, then wire the output to the other edge of the FOR loop, and make sure indexing is enabled. then wire that output to a "Write To Spreadsheet File" using the 1D array input. it should process very fast, and you just have to wire up some stuff like the file path and deli
meters and stuff. did that explain it well enough?
micah
Similar Messages
-
Hi folks,
Plz tell me if u know how can i add column dynamically
in oracle content management SDK webstarterapp.I am stucked here for quite sometimes.plz tell me ASAP.
Regards
PrasenjitTake a look at:
http://download-east.oracle.com/docs/html/B12187_02/toc.htm
You should use OMBALTER TABLE command.
Regards,
Marcos -
Here's a sample of the invoice. I would like to automatically calculate the 'amounts', 'totals' and 'subtotals' sections.
Is this possible? How do I do it?Got it!
Select the cells you wish to either SUM, PRODUCT, COUNT, etc...
Then, at the top of the screen, press on the INSERT heading,
then press on the FUNCTION setting,
then press on the actual function you are looking for,
and it should automatically insert the function into the appropriate cell it is needed.... -
How do I add column headings to an output file?
Hi,
I have an internal table that is created in my program and I send that table out as a data file attachment on an email.
I have a request to include column heading on the data file going out.
Does anyone have any ideas as to how I can include a heading line as the first line of the output file?
I'm an ABAP newbie and I don't know the best way to accomplish this?
Thanks for your help!
AndyHi,
While Building the attachement just add the field description refer following code
Append header line to download data
CONCATENATE 'Company Code'(004)
'State'(007)
'Store'(010)
'Tax Type'(013)
'Purchase'(015)
'Tax Rate'(017)
'Gross Tax Due'(021)
'Discount'(023)
'Net Tax Due'(025)
INTO ls_download-data
SEPARATED BY lc_tab.
APPEND ls_download TO gt_download.
CLEAR : ls_download.
LOOP AT gt_error_log INTO ls_error_log.
CONCATENATE ls_error_log-bukrs
ls_error_log-budat
ls_error_log-monat
ls_error_log-gjahr
ls_error_log-xblnr
ls_error_log-bschl
ls_error_log-waers
ls_error_log-hkont
ls_error_log-wrbtr
ls_error_log-prctr
ls_error_log-kostl
ls_error_log-message
INTO ls_attach-line SEPARATED BY lc_tab.
CONCATENATE lc_cret ls_attach-line INTO ls_attach-line.
Append Error log data to attachment Table
APPEND ls_attach TO lt_objbin.
ENDLOOP.
Call the function module to convert the data into Hex
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = lt_objbin
objcont_new = lt_objbin.
Append converted hex data to attachment table
LOOP AT lt_objbin INTO lv_line.
ls_conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' endian = 'B').
Call lmethod to add the data to the output buffer sequentially.
CALL METHOD ls_conv->write( data = lv_line ).
lv_buffer = ls_conv->get_buffer( ).
MOVE lv_buffer TO lv_hexa.
MOVE lv_hexa TO ls_hex-line.
Append converted hex data to attachment table
APPEND ls_hex TO gt_attach.
ENDLOOP.
Regards,
Prashant -
How do I add columns to document in pages?
I am trying to figure out how to add a section of columns to my document - whenever I try, the whole documents turns into columns. Please help!
Hi Tammy,
Pages has the ability to isolate portions of the document for the purpose of changing the layout. Insert > Layout Break above the region where you want to change the numbers of columns, and again below that region. Then when you make your changes between the Layout Breaks the change won't spread to the rest of the section. You can also isolate the format by inserting a Section Break. The only difference is that a Layout Break operates within a Section.
Jerry -
How do I add an individual photo from a stack to an album?
I'm trying to add a photo from a stack to an album. However, even if I un-stack the photos in the parent folder & copy a single photo into the album when I then re-stack the original photos they all appear in the album too. Is there a way around this or do I just have to leave all my pictures un-stacked?
Thanks for any help you can give.photojester wrote:
I'm trying to add a photo from a stack to an album. However, even if I un-stack the photos in the parent folder & copy a single photo into the album when I then re-stack the original photos they all appear in the album too. Is there a way around this or do I just have to leave all my pictures un-stacked?
Thanks for any help you can give.
You can't include an item from a stack in an album. What you include in the album, is the link to the top level member of the stack. If you change the order of files in the stack, that is reflected in the album.
Best solution in my opinion : temporarily expand the stack, select the wanted item and export it somewhere. Then 'import' it in the organizer and put it in your album. -
How do I add a scroll bar to an array?
I want to take a 2D array and change the row its is in with a scrollbar so that in a another array index I can pull out individual number from each row.
So I have a CSV file [time,1,2,3,4,5] and I want the user to able to vary the time with a scrollbar.
Thanks!sofiakyle wrote:
I want to take a 2D array and change the row its is in with a scrollbar so that in a another array index I can pull out individual number from each row.
So I have a CSV file [time,1,2,3,4,5] and I want the user to able to vary the time with a scrollbar.
A scrollbar is a cosmetic UI element that does not modify data (e.g. vary time) or "pull out numbers" (whatever that means).
If you can only scroll through 8 values, maybe you need to transpose the array to swap rows with columns.
LabVIEW Champion . Do more with less code and in less time . -
How can I add a new row into an array bases on a1D array
Hello,
I build a FieldPoint application with LabView 7.1 RealTime. I've a measurement loop with 1Hz sample rate. I sample 5 channels and put them into a 1D array. Presently I write directly to a cvs file but this I've to cahnge because my loop slows down to 0.2 Hz.
I want to sample my data the hole day (86400 loops) and save them inside of an array. When the time is over I want write the hole array (table) to the file.
How I can do this or hoow I can add my 1D array to a new row in my 2D array?
Thanks
Thomas
ThomasTomDooley wrote:
Hello,
...I write directly to a cvs file ...my loop slows down to 0.2 Hz
Writing a series of 5 values to a file should not take so long. There is probably something wrong in the way you are saving your data. May be you should post a simplified version of your vi, so we could see how to improve your code.
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How to put 58 columns of data into an array in one shot?
I have a set of data with 58 columns and 5000 rows. However, I need to find offset for all the elements in this 5000x58 set of data. Is there an easier way to put all the data (offset) into an array in one shot other than using build array function? This is because if I use the build array function, I will need to separate all the data into 58 columns by indexing them. This is too time consuming.
Thanks for the suggestion! Have a good day!VanessaWen wrote:
I have a set of data with 58 columns and 5000 rows. However, I need to find offset for all the elements in this 5000x58 set of data. Is there an easier way to put all the data (offset) into an array in one shot other than using build array function? This is because if I use the build array function, I will need to separate all the data into 58 columns by indexing them. This is too time consuming.
You need to explain in much more detail, because your problem is not clear.
Is this a 2D array with 58 columns and 5000 rows?
What is your definition of "offset"?
Where does the offset value come from?
Is "offset" it the same for each row (or column) or does it depend on the data?
What is the definition of "one shot"?
Why would you need to seperate all the data into columns in order to use build array?
It it "too time consuming" to write the program or is the execution slower than expected?
Is the final output a 1D or 2D array or something else?
Please attach a VI containing a small 2D array diagram constant with typical data, then show us what kind of output you would expect after applying the described operation.
LabVIEW Champion . Do more with less code and in less time . -
How can i add to a listBox items near in a new column other items ?
The items on the right i changed the property of the listBox1 righttoleft to Yes.
My problem is i want to build a new column for the number so each number i'm adding will be next on the left to the belong item string. And not under it like now.
1. Maybe i need to use another control and not listBox ?
2. How can i add column/s and also maybe adding a title to each column like: Names Id Number....?If you want columns, you should consider a
ListView or
DataGridView. -
How to add column in Dynamic VO
Hello All,
We are on 11.5.10 and
i am trying to add a column toProduct - Supplier Items - click Orders page
when i click about this page it is showing this
POS_SUPPLIER_INQUIRIES177_POS_PO_LINES_D2177_177POS_PO_LINES_DDynamicVO
This has Dynamci VO.
How do i add column to this view.
It seems that this view is based on AK Region POS_PO_LINES_D and this region is based on a view POS_PO_LINES_V.
Please help me in doing this.
Thanks,
Mehta.Check the page's controller code. That will point you to the base definition of the VO used in the dynamic view.
--Shiv -
Add columns to RCOPOC_WKLT
Hi.
Does anyone know how can I add columns (from my structure) at the above report?
It's the CO60 transaction (Worklist for PI Sheets).
I think it's somthing about an enhancement for this report but how can I do it??
Thanks,
RebekaRobeka
There is no way you can do enhancement to add new column to the ALV.... See report RCOPOC_WKLT, subroutine "build_fieldcat"....
Though, you can modify this report by using access key or create Z-Copy of this report and modify it....
Thanks
Amol Lohade -
Dynamic add column to datatable
Hi ,
How can I add columns to datatable dynamically ? I don't know how many columns will be selected.
Actually I don't know how to do it in the jsp file. There is columns tag in it. Is there any tag like 'for' ?
Thanks in advance.
Wilsonthanks for that but still cannot figure out what is wrong with my code (I'm really getting crazy !). I can see the titles of the columns but I cannot see any data. Any ideas ?
<h:dataTable styleClass="dataTable" id="tablecsv"
binding="#{mainPage.dataTable}" rendered="#{mainPage.completed}"
value="#{mainPage.resultsModel}" var="varresultsModel" />
public UIData getDataTable()
FacesContext context = FacesContext.getCurrentInstance();
String[] cols = getTheTable();
List children = dataTable.getChildren();
children.clear();
dataTable.setVar("vartableRow");
for (int i = 0; i < cols.length; i++)
UIColumn col = new UIColumn();
col.setId("column" + i); //?
UIOutput out = new UIOutput(); //?
out.setId(cols[i] + i); //?
/* children.add(col);
HtmlOutputText header = new HtmlOutputText();
String label = "" + cols;
header.setValue(label);
col.setHeader(header);
HtmlOutputText data = new HtmlOutputText();
col.getChildren().add(data);
data.setValueBinding("value", context.getApplication().createValueBinding("#{" + (i +1) + "}"));
HtmlOutputText header = new HtmlOutputText();
String label = "" + cols[i];
header.setValue(label);
col.setHeader(header);
ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{result." + cols[i] + "}");
out.setValueBinding("value", vb);
col.getChildren().add(out);
dataTable.getChildren().add(col);
this.completed = true;
return this.dataTable;
public ArrayList getResultsModel()
this.resultsModel = new ArrayList();
for (int n = 0; n < getTheTable().size() - 1; n++)
this.resultsModel.add(new Integer(n));
return this.resultsModel; -
Add columns to extended value selector
Hi All,
I have created an Extended value selector that has 2 columns(KEY column and VALUE column). How do I add columns to Extended Value Selector.
Thanks,
TomHI Tom,
->EVS just picks value from enumeration type which you must have created and displays those value.
->ONLY key and Value are the two columns possible. You cannot add any new columns to that.
->F4 help helps only to get values for a particular field which are already present somewhere ex may be some bapi or database.
->OVS is new version and you can look for that also if it suits you.
Thanx. -
Add column dinamically to listview
hi,
somebody know how can i add columns dinamically to a listview? i am going to
show data on these new columns.
thanks in advanced
Bruno MunozHi Andy,
A DB trigger can be created that accesses Apex Items? Or what do you mean? I didn't know that was possible.If so, does it check the session on it's own? because multiple instances could be running and in such case, there could be more than one value for the item. If it's possible to use an item's value with nv('Pnn_ITEMNAME')it could solve lots of problems :-)
About the other option, I understand that Hidden columns can't be accessed with apex_application.g_fnn(Row), and said column doesn't have to appear in the report.
If I can access an Item's value whith a Trigger and that value is the one from the user sending the request, that would be the ideal answer.
Thanks,
Marc
Edited by: MarcS on Nov 16, 2008 1:03 PM
Maybe you are looking for
-
Time Machine deleted old backups as disk filled up. Now I'm confused
Hi guys, My backup disk was full, and hence Time Machine deleted my old backup. The most important data on my Mac (for me) is my iPhoto library. As I know it, Time Machine deletes backups for files which are used less frequently. In my iPhoto li
-
Is there a tutorial or article on how to create or customize your own Ajax Framework page on the portal for the SAP Netweaver CE 7.2 version? Vijay
-
Having problem to check balance.
I am having a problem to check my balance or any other service involving *x# with my iphone 4s. I am currently using ios 7.0.4. I have tried everything even reset the settings but nothing worked.
-
I have optimise my system and have 16GB of ram and am only running lightroom, any ideas? I have re installed the program
-
Need help with load balancing and DNS proxy -Repost
Hi, I need help on how to configure my router so it will work with my DNS proxy and load balancing. I have a Linksys LRT224 router. I have two broadband connections from two separate ISPs,500Mbps each (WAN1 & WAN2). WAN1 has a static IP and WAN2 is d