Info

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

Dimension mismatch due to unknown Script loop?

1 回表示 (過去 30 日間)
xenon99942
xenon99942 2017 年 4 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi!
tawes_new(:,1) = tawes.data(:,1); %temp. time array
tawes_new(:,2) = tawes.data(:,4); %temp. rain rate array [mm/min]
tawes_new(:,3) = tawes.data(:,12); %global radiation [W/m^2]
tawes_new(:,4) = tawes.data(:,14); %foehn index
tawes_new(:,5) = tawes.data(:,6); %hz wind speed m/s
tawes_new(:,6) = tawes.data(:,2); %Temperature in °C
tawes_new(isnan(tawes_new(:,2)),:)=[]; %delete NaNs from data in a row that indices are equal later on
tawes_new(isnan(tawes_new(:,3)),:)=[];
tawes_new(isnan(tawes_new(:,4)),:)=[];
tawes_new(isnan(tawes_new(:,5)),:)=[];
tawes_new(isnan(tawes_new(:,6)),:)=[];
The error occurse for line 1. tawes.data(:,1) is a sized m X 1 array. Later in my script i am uniformily deleting not-needed indices from the copy array tawes_new(:,1) of tawes.data(:,1) (and others). So i will work with the modified copy tawes_new(:,1) instead of the original data. but why is the error occuring? it would be only an error if the script would be kind of a loop and starts from the beginning again. than the "=" assignement would be incorrect , of course.
  1 件のコメント
Adam
Adam 2017 年 4 月 27 日
'Dimension mismatch due to unknown Script loop' is not an error message I am familiar with. What is the actual message? (I'm assuming that is just your interpretation of the message.
If you run your script more than once though remember that everything will be left over in the workspace from the previous run. This is why functions are far better than scripts in general (well, one of the reasons, at least).

回答 (0 件)

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

Community Treasure Hunt

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

Start Hunting!

Translated by