필터 지우기
필터 지우기

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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by