for loop number of elements

1 回表示 (過去 30 日間)
shobhit mehrotra
shobhit mehrotra 2015 年 2 月 4 日
編集済み: James Tursa 2015 年 2 月 4 日
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

採用された回答

Michael Haderlein
Michael Haderlein 2015 年 2 月 4 日
Depending on Ui, dataind and longm, this could work:
winddivergencex(n,:)=...
or
winddivergencex(:,n)=...

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by