for loop number of elements
2 views (last 30 days)
Show older comments
shobhit mehrotra
on 4 Feb 2015
Edited: James Tursa
on 4 Feb 2015
Hello I have this code so far, it wont run because the number of elements of winddivergencex is not the same number of elements as n because of the differentiation, how can I get this to work? Thanks
for n = 1:length(dataind)
winddivergencex(n)= (diff(Ui(min(dataind{n}):(max(dataind{n})))))./(diff(longm(min(dataind{n}):(max(dataind{n})))));
end
0 Comments
Accepted Answer
Michael Haderlein
on 4 Feb 2015
Depending on Ui, dataind and longm, this could work:
winddivergencex(n,:)=...
or
winddivergencex(:,n)=...
0 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!