How to create matrices and change matrix names in a for loop (Sprint and Eval) ?
Show older comments
Hi,
I have the following loop.
periods=28
*for z=1:periods
Period(z)Return{s,j}= open - close
FReturnLMS{s,k} = Period(z)Return{s,j}
end;*
All loops are working except the z in * Period(z)Return{s,j}*. Please ignore s and j & k as they work fine. Only evaluating z is an issue. I am having trouble in deploying sprintf and eval.
Also please tell if there is a detailed source to understand the usage of Sprintf and eval.
All help will be appreciated.
Regards,
AMD.
Accepted Answer
More Answers (1)
ARS
on 7 Jun 2013
0 votes
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!