02-13-2011 05:19 PM
Hi guys,
I read a matrix from a text file and I want to delete the first and last columns of the matrix. I've been trying to do it with delete from an array function but it doesn't do it the way I want. Any suggestions?
02-13-2011 06:02 PM
Hello Elnaz7,
Here's one way to do it.
02-13-2011 06:21 PM
Thanks but this deleted the very first row instead of column.
02-13-2011 06:29 PM
my mistake, that was for deleting rows... here's the column one...
02-13-2011 06:37 PM
Yes, it works, thank you.
Now another question: If I want to feed this data to another module row by row for example in a for loop how should I do that?
02-13-2011 08:58 PM
drop a "for loop" on theram and Block diagram and look for the help. (CTRL+H). There are some good examples also available so that you can be familiar with using the for loops.
Guru
02-14-2011 01:38 AM
Keep in mind that by default, 2-D LabVIEW arrays are row-based. So though you might be thinking that the first indexing input for the 'index array' primitive is for columns, it is actually for rows. You can either select the second input for the 'index array', or, if you are like me and think better in columns, you can transpose the array before you operate on it. I recommend getting used to the order of the inputs for the array tools and forcing yourself into the LabVIEW convention, as it gets complicated if you need to invert an array before you operate on it, and then again after so that the array returns to row-centric order, which is what all the rest of the LV array tools are expecting
02-14-2011 12:57 PM
Hi Elnaz7,
Have you researched some of our examples and tutorials for manipulating clusters and arrays?
Here is a tutorial I feel you should go through: http://zone.ni.com/devzone/cda/tut/p/id/7571
03-18-2013 12:56 AM
hi
how to delete rows from 2d array.Those rows which are having number of ones(1) greater than a certain number has to be deleted.Can you please help me
03-18-2013 03:23 AM
Hi dfsfdsfv,
Check whether this meets your requirements.