Info

この質問は閉じられています。 編集または回答するには再度開いてください。

load and if loops

1 回表示 (過去 30 日間)
mcm
mcm 2016 年 10 月 19 日
閉鎖済み: Walter Roberson 2016 年 10 月 19 日
I created a prompt that loads an array with 50 values
I need to assign x to the values of that array to run an if loop. This is what I have so far. How can I improve my code to make it work?
pick_year = input('Pick a year: either 1997 or 2013: ')
for pick_year = 1997
x = load('UPDRSscores_1997')
if x == 0
display('normal')
elseif x == 1
display('slight')
elseif x == 2
display('mild')
elseif x == 3
display('moderate')
elseif x == 4
display('severe')
end
end
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 10 月 19 日

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by