imshow is not working
Afficher commentaires plus anciens
Execution of script image as a function is not supported:
C:\Users\NEERAJ RH\Dropbox\My PC (DESKTOP-LM8JK3U)\Desktop\major project\experimntation\image.m
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 gauss (line 2)
imshow(A)
Réponses (1)
Jan
le 17 Juin 2022
You have created a script called "image.m". This shadows the built-in function image.
Shadowing built-in functions is a serious problem. Trying to avoid such name conflicts is not easy, because many programmers do not know the names of all toolbox functions. Therefore it is safer to store user-defined functions in folders, which are appended to the path:
addpath yourFolder -end
and not to use cd to move the current folder to a folder, which contains M-files.
You have to rename your "image.m" file to let the buil-in image() work again.
See this tool to check for interferences: https://www.mathworks.com/matlabcentral/fileexchange/27861-uniquefuncnames
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!