函数执行:错误"/>
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 作为函数执行:错误
发布评论