Saving selected array of data from set of output array
Show older comments
Hello
My problem looks similar to the following -
for ii = 1:1000
x = cos(ii)*{a 1by1000 array}
end
Now, out of this 1000 results for x, i want to save only few data sets; like at ii=1,100,200,300....,1000. The problem that i am handling in real has millions of loops but i need just a few array. Can anyone please help me to get a solution.
Thanks in advance.
Accepted Answer
More Answers (1)
Mani
on 22 Aug 2012
0 votes
create an array of the values you need at different locations eg : i=1:100: number_of_values
then create a new array to store them eg: for k= 1:length(number_of_values) req_values(k)= all_values(i); end
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!