matlab报尝试将 SCRIPT xxx 作为函数执行:错误

编程入门 行业动态 更新时间:2024-10-09 18:17:32

matlab报尝试将 SCRIPT xxx 作为<a href=https://www.elefans.com/category/jswz/34/1771370.html style=函数执行:错误"/>

matlab报尝试将 SCRIPT xxx 作为函数执行:错误

matlab报尝试将 SCRIPT xxx 作为函数执行:错误

出现这种错误主要是文件名和函数名重名所致,只需重命名

#这里的matlab脚本名字命名为imwrite.m,与imwrite函数重名,报错
>> B=imread('G:\matlab\img\1.jpg');
>> imshow(B);
>> imwrite(B,'2.png');
尝试将 SCRIPT imwrite 作为函数执行:     
G:\matlab\test\imwrite.m#这里将脚本名字改为test_imwrite.m,这次运行顺利 
>> test_imwriteinfo = Filename: 'G:\matlab\test\test1.bmp'FileModDate: '21-Apr-2019 12:10:15'FileSize: 188054Format: 'bmp'FormatVersion: 'Version 3 (Microsoft Windows 3.x)'Width: 250Height: 250BitDepth: 24ColorType: 'truecolor'FormatSignature: 'BM'NumColormapEntries: 0Colormap: []RedMask: []GreenMask: []BlueMask: []ImageDataOffset: 54BitmapHeaderSize: 40NumPlanes: 1CompressionType: 'none'BitmapSize: 188000HorzResolution: 0VertResolution: 0NumColorsUsed: 0NumImportantColors: 0

 

更多推荐

matlab报尝试将 SCRIPT xxx 作为函数执行:错误

本文发布于:2024-03-08 12:32:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1720879.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   错误   matlab   SCRIPT   xxx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!