How to use 2 forloop in matlab?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad Andi Yusran
am 17 Mär. 2020
Kommentiert: Muhammad Andi Yusran
am 17 Mär. 2020
I have a Mat-file. My Mat-file have 204 length. How can i just get from length 1 to 51 from my Mat-file? How can i use another forloop in my code to get i = 1 till i = 51? This is my code.
a = 0;
m = matfile('elm_output.mat');
output = m.output;
for i = 1:length(output)
if output(i) == 1
a = a+1;
end
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!