Info

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

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. Error in Chandu (line 6) w(i,j) = atmoshwm(l​atitude,lo​ngitude,al​titude,'da​y',i,'seco​nds',j,'ap​index',80,​'model','t​otal', 'version',

1 回表示 (過去 30 日間)
CHANDRASEKHAR MANDADI
CHANDRASEKHAR MANDADI 2019 年 10 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
latitude= 38.45;
longitude= 11.10;
altitude=21500;
for i=1:365
for j=1:60:86400
w(i,j) = atmoshwm(latitude,longitude,altitude,'day',i,'seconds',j,'apindex',80,'model','total', 'version', '14');
end
end

回答 (1 件)

Ankit Kumar
Ankit Kumar 2019 年 10 月 22 日
Hi Chandrasekhar,
The function atmoshwm(latitude,longitude,altitude,Name,Value) returns a M-by-2 array.
See this for more info,
An element of a matrix cannot store a M-by-2 array. For your use case you can use a cell array,
w{i,j} = atmoshwm(latitude,longitude,altitude,'day',i,'seconds',j,'apindex',80,'model','total', 'version', '14');

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by