determining number of inputs

2 Ansichten (letzte 30 Tage)
maryam 94
maryam 94 am 20 Dez. 2014
Kommentiert: maryam 94 am 20 Dez. 2014
hello. usually in matlab, we ask the user to enter a value once using this code x=input('message'). but what if we wanted the user to determine how many times to enter a value?

Akzeptierte Antwort

Thorsten
Thorsten am 20 Dez. 2014
N = ('How many times?');
for i=1:N
a(i) = ('your input');
end

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by