why mat2gray function isnt working in my matlab?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Roni
am 4 Okt. 2023
Kommentiert: Walter Roberson
am 4 Okt. 2023
this is the code:
clear all
load('BrainTumors.mat');
imagesc(MRI{1});
colormap('gray')
a = mat2gray(MRI{1});
the last row isnt running and thats the error:
"Undefined function 'mat2gray' for input arguments of type 'int16'.
Error in ExecriseSolution1 (line 5)"
i was able to run this code in other computer. how do i fix it?
3 Kommentare
Akzeptierte Antwort
Steven Lord
am 4 Okt. 2023
The mat2gray function is part of Image Processing Toolbox. Do you have this toolbox installed and licensed? You can check this by running the ver command and looking for a line starting with "Image Processing Toolbox" in the displayed output.
If that line does not exist you will need to install Image Processing Toolbox to use this function.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!