02-22-2011 02:32 AM - edited 02-22-2011 02:33 AM
I think nobody can help because your description in the above posts and in your attached VIs are pure gibberish to me.
Your code makes no sense. There is a FOR loop that spins 10000 times, just creating duplicate sets of the same data. None of your controls contain default data, so how are we supposed to know what the data is?
All your controls are empty. Provide a VI that contains the 13x5001 (or 14x5001) array as default data. Tell us how you want to reduce the data.
Tell us exactly what formula you want to fit it with. U(r, t)?
02-22-2011 03:43 AM
Hi altenbach,
I have tried and constructed something related to my previous request.
In the attached file "Build array_1", 5000 velocity data are taken and write into array. The first column of array is related to radial positions. I tried to write the first 5000 data into the second row. (Because the first row will be zero, 5000 zero for r=0.133 m)
Is the construction in the red circle in the "Build array_1" correct or not? (Delete array is used because firstly I take 6000 data and then delete the first 1000 data to obtain 5000 data)
Pusing the "Next Step" button, I run the the vi again for i.e., r=0.127 m and then, will it write the realted 5000 data into 3rd row???
And after 13 run, the matrix will be [14x5001]. Is this ok or not for my construction given in red circle in "Build array_1"????
And then I will plot each column with respect to first colum. So, 5000 curve fits will be performed. I construct something for this in the second attached file of "Build array_2".
Is this correct????? And later each integrated Um values will be written into the one row.
According to my constructions given in image files, could you please comment on them??? I also attached my original vi to overview.
Please comment and help on my construction. Thanks a lot.
02-22-2011 11:03 AM
Sorry, I only have a laptop at the moment, so it is impossible to efficiently look at your code monster. I also get some broken wires and type mismatches. Did you customize any of the system VIs and save them under the same name? 😉
Let's look at the images instead:
Build array_1: Why are you using "delete from array" to take an array subset?
Built array_2: Makes no sense: you have a 2D array and do some operations, ending up with a single scalar value. Now you use a combination of for loop and built array to turns it into a 5000x1 2D array will all the same values. "Initialize array" would do the same thing in one atomic operation. Why do you need the big array, containing nothing but the information held in a single scalar?
Please make another VI where "output array" contains actual data (run the VI, right-click "output array" terminal...create constant, Delete all the other code, keeping the new diagram constant connected to the start of this code fragment. Save the VI.
02-22-2011 12:49 PM
Hi altenbach,
Thank you for your reply. However, I cannot understand what I am going to do as you said.
I want to say what I want to do step by step;
1) I have a 13 constant values which will be in the first column everytime. These are 0.0133; 0.0127; 0.0122 ...............and 0 vertically in the first column.
2) For 0.0133 all the values (5000 data) are again constants zero "0" (the first row across 0.0133 are all zero).
3) then first run will be for 0.0127 and all 5000 data taken will be written to second row across (near) 0.0127 and then second run for 0.0122 and 5000 related data will be written to third row across/near 0.0122 so on...
I wanted to build this one in the 1. image in the red circled. But, I am not able to construct this array. Because I cannot understand the index, disabled row, column etc. in the build array. Also to write each run (5000 data) to the next and next row, I used increment +1 in the index of build array. But after all 13 run, only 13 data (not 5000 data)of last run were written in the second column (instead of row) across the first column constant data .
How can I fill all 13 rows with related 13 runs (in each row 5000 data).
If we can achieve this then I will integrate each column and decrease 13 row to 1 row.
Upto now, please help. Thanks again.
02-22-2011 01:00 PM - edited 02-22-2011 01:02 PM
You use "replace array subset", which does not resize the original array. You cannot replace elements that don't exists, i.e. that are outside the current size boundaries.
Easiest would be to resize the origianl array constant in some way to the final size before replacing with real data. (e.g. "reshape" to a 5001 elements inside a FOR loop)
Please reduce the problem to a manageable nugget containing only a singe FOR loop, your diagram constants, and some fake data generators. Only retain code directly realted the the problem. Your current VI is not debuggable for many reasons.
02-23-2011 02:13 AM
Hi altenbach,
I attached a demo.vi.
Across 0,0133; I want to write 5000 zero value in the first raw horizontally.
Then
Across 0.013; I want to write 5000 data of the first run in the second row. And so on.
After 13 run I will obtain [14x5001] array. Then I will integrate 13 data of each column seperately with respect to radial positions in the first column.
Thanks
02-23-2011 03:03 AM
Hi altenbach,
I also constructed an array. It will be something like that but it is not correct now. The data was written to the bottem of the constants. However, I want to write first run value into the second row, near the value of 0.013.
Thanks
02-24-2011 08:44 AM
Hi altenbach,
Could you have a time for looking at my vis?
02-25-2011 04:37 PM
Hi,
Is there nobody who can help me for creating an array (or matrix)?
I atached the vis that I tried. But I cannot achieve it.
Across 0,0133; I want to write 5000 zero value in the first raw horizontally.
Then
Across 0.013; I want to write 5000 data of the first run in the second row. Then I want to write 5000 data of another run into the third row without exit of vi. And so on.
After 13 run I will obtain [14x5001] array. Then I will integrate 13 data of each column seperately with respect to radial positions in the first column.
Please help.
Thanks a lot.
02-25-2011 04:39 PM
Hi,
Is there nobody who can help me for creating an array (or matrix)?
I atached the vis that I tried. But I cannot achieve it.
Across 0,0133; I want to write 5000 zero value in the first raw horizontally.
Then
Across 0.013; I want to write 5000 data of the first run in the second row. Then I want to write 5000 data of another run into the third row without exit of vi. And so on.
After 13 run I will obtain [14x5001] array. Then I will integrate 13 data of each column seperately with respect to radial positions in the first column.
Please help.
Thanks a lot.