Loop for multiple calculation
古いコメントを表示
Hi everyone,
I have a bunch of calculations like this:
F1 = (H(4,1) - baseline1) / baseline1
F2 = (H(20,1) - baseline2) / baseline2
F3 = (H(36,1) - baseline3) / baseline3
...
F20 = (H(308,1) - baseline20) / baseline20
As you can see, the row in H goes up in an increment of 16. I thought a loop may be good for this but am unsure how to go about it. Does anyone have any suggestions?
Thanks,
Le
5 件のコメント
Star Strider
2014 年 4 月 8 日
What is baseline?
Scalar?
Vector? What are its dimensions?
Thang Le
2014 年 4 月 8 日
Star Strider
2014 年 4 月 8 日
Are you storing baseline1 and the rest, or are they one-offs?
I ask because you could as easily store them as baseline(1), etc. That would make it much easier for you to reference them in a loop.
Is H a vector (308x1) or matrix?
(I’m doing my best to figure out what you are doing.)
Thang Le
2014 年 4 月 8 日
Image Analyst
2014 年 4 月 8 日
OK, I've modified my answer code to take this new information into account.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!