- the relevant lines of codes leading to the error
- the full error message, everything in red
Am new to Matlab.if i use imshow funtion,matlab shows error in the built in function..how can i overcome this problem?
4 次查看(过去 30 天)
显示 更早的评论
Am new to Matlab.if i use imshow function in my program,matlab shows error in the built in function..how can i overcome this problem?
4 个评论
Steven Lord
2018-2-16
That doesn't look like the FULL error message. It shows where the problem occurred but not what the problem is. As Guillaume said, show everything in red.
回答(1 个)
Guillaume
2018-2-16
Now that we've got the full error message, it's clear what the problem is.
Rename your image.m script to something else. imshow is trying to use matlab's own image function but because files in your current directory take priority it's calling your image script instead. We say that your script shadows the image function.
Other functions that are commonly shadowed by mistake are sum, mean, table, cell, struct, var, i and j. Don't use these as functions, scripts or variable names.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!