Vector of values error for loop

1 回表示 (過去 30 日間)
gorilla3
gorilla3 2017 年 11 月 1 日
編集済み: KL 2017 年 11 月 1 日
I'm trying to make an array (r1_tot) of values in the workspace with 25 values ranging from 0.010 to 0.035. However I obtain an array of 25 values that are all 0.035.
this is the code:
for s=0.010:0.001:0.035
for i=1:1:length(s)
r1=s;
r1_tot(i)=r1;
...
end
...
end
Could you please help?

採用された回答

KL
KL 2017 年 11 月 1 日
編集済み: KL 2017 年 11 月 1 日
r1_tot = linspace(0.01,0.35,25)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by