Filter löschen
Filter löschen


Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Dimension mismatch due to unknown Script loop?

1 Ansicht (letzte 30 Tage)
xenon99942 am 27 Apr. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
tawes_new(:,1) =,1); %temp. time array
tawes_new(:,2) =,4); %temp. rain rate array [mm/min]
tawes_new(:,3) =,12); %global radiation [W/m^2]
tawes_new(:,4) =,14); %foehn index
tawes_new(:,5) =,6); %hz wind speed m/s
tawes_new(:,6) =,2); %Temperature in °C
tawes_new(isnan(tawes_new(:,2)),:)=[]; %delete NaNs from data in a row that indices are equal later on
The error occurse for line 1.,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,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 Kommentar
Adam am 27 Apr. 2017
'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).

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by