Execution of script image as a function is not supported
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MD. MOJAHIDUR RAHMAN
el 25 de Mayo de 2023
Comentada: Amaury Bretin
el 28 de Ag. de 2023
Error in images.internal.basicImageDisplay (line 24)
hh = image(cdata, ...
Error in imshow (line 330)
hh = images.internal.basicImageDisplay(fig_handle,ax_handle,...
Error in image_1 (line 101)
imshow(RGB)
3 comentarios
Image Analyst
el 15 de Jul. de 2023
@Simenew yes, @Steven Lord can and did. Like @Steven Lord said below, you have a file called image.m in your current folder or on your search path that you wrote and then in your code you do
image(imageName);
to try to display the image variable. MATLAB sees your image.m before it sees the built-in function (because you override it with your version). So then MATLAB tries to run that script (your image.m script) as a function since, in your code when you call it, you have parentheses after it and are trying to pass it an image variable. However your image.m is a script, not a function, and therefore cannot take any input arguments like you tried to give it. Bottom line use
>> which -all image
and locate the file that is your image.m and rename it or delete it.
Respuesta aceptada
Steven Lord
el 25 de Mayo de 2023
You've likely created your own image.m file that's taking precedence over the image function included in MATLAB. To check this run the following command.
which -all image
If there is an image.m not under matlabroot you should rename that script file.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!