필터 지우기
필터 지우기

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