Why getting this error??
Ältere Kommentare anzeigen
min=min(data);
max=max(data);
normdata=(data - min)./(max - min)
Why getting this error??
Error using -
Matrix dimensions must agree.
Antworten (2)
James Tursa
am 16 Dez. 2020
Bearbeitet: James Tursa
am 16 Dez. 2020
Don't shadow the MATLAB min() and max() functions with variables of the same name. Also min() and max() operate on columns by default, not the entire matrix. Maybe this is what you want:
mindata = min(data(:));
maxdata = max(data(:));
normdata = (data - mindata)./(maxdata - mindata)
Image Analyst
am 9 Jun. 2022
Kategorien
Mehr zu Dynamic System Models finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!