Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Dimension mismatch due to unknown Script loop?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Adam
el 27 de Abr. de 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).
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!