Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Need help making a for loop

1 回表示 (過去 30 日間)
Robert
Robert 2014 年 9 月 30 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I'm still pretty new to matlab and am having trouble with a loop I'm trying to make.
Basically I have monthly data for 2 separate paramaters, x and y from many different locations over many years. So I have a a different workspace folder for each month of data (a matrix of cells each representing a pixel.
Basically I want to divide each x value the y value of the corresponding location e'g' x(1:1)/y(1/1), x(1:2)/y(1/2).
So I think I need a loop inside a loop. The first loop to go through all of the cells in 2 matrices of the same month, and a second loop to continue this through all the months of data.
They also need to be outputted in some way
I hope that makes sense
  1 件のコメント
Jan
Jan 2014 年 9 月 30 日
It is much easier to answer, if you show us, what you have tried so far.

回答 (1 件)

Julia
Julia 2014 年 9 月 30 日
Hi,
does
x./y
solve your problem?
Or do you really need a loop?
  1 件のコメント
Robert
Robert 2014 年 9 月 30 日
WOW! I had no idea that function even existed! That is a very helpful start, Thanks! I think I can do it manually for all months using that, Cheers :)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by