Loop for multiple calculation
Mostra commenti meno recenti
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 Commenti
Star Strider
il 8 Apr 2014
What is baseline?
Scalar?
Vector? What are its dimensions?
Thang Le
il 8 Apr 2014
Star Strider
il 8 Apr 2014
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
il 8 Apr 2014
Image Analyst
il 8 Apr 2014
OK, I've modified my answer code to take this new information into account.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!