help with eval function - calculating multiple arrays at once
Show older comments
Hi, I need to calculate a seperate array for 'speedMsAWP' for each the speedMS values 1 to 12. So one the code had finished running I would have 12 unique speedMsAWP arrays that were calculated with the speedMS arrays(1 to 12). I was recommened to use the eval function to do this. Any help appreciated.
The code below is what I have so far
speedMS1 = speedMS(1:744,:);
speedMS1 = speedMS1(:);
speedMS2 = speedMS(745:1416,:);
speedMS2 = speedMS2(:);
speedMS3 = speedMS(1417:2160,:);
speedMS3 = speedMS3(:);
speedMS4 = speedMS(2161:2880,:);
speedMS4 = speedMS4(:);
speedMS5 = speedMS(2881:3624,:);
speedMS5 = speedMS5(:);
speedMS6 = speedMS(3625:4344,:);
speedMS6 = speedMS6(:);
speedMS7 = speedMS(4345:5088,:);
speedMS7 = speedMS7(:);
speedMS8 = speedMS(5089:5832,:);
speedMS8 = speedMS8(:);
speedMS9 = speedMS(5833:6552,:);
speedMS9 = speedMS9(:);
speedMS10 = speedMS(6553:7296,:);
speedMS10 = speedMS10(:);
speedMS11 = speedMS(7297:8016,:);
speedMS11 = speedMS11(:);
speedMS12 = speedMS(8017:8760,:);
speedMS12 = speedMS12(:);
a = 0.11
speedMsAWP(1 to 12) = speedMS(1 to 12) *((30/31)^a);
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!