“错误使用plot3,向量长度必须相同“ 。

想问一下,这个代码为什么出现了:“错误使用plot3,向量长度必须相同“?
sem=imread('sem1.tif');
sem=rgb2gray(sem);
[a,b]=size(sem);
sum=0;
for m=1:a
for n=1:b
sum=sum+[double(255-sem(m,n)/m*n)];
z(m,n)=sum;
end
end
x=1:a;
y=1:b;
plot3(x,y,z);
imtool(sem);

 採用された回答

namaran
namaran 2023 年 5 月 17 日

0 投票

就是说x y z 的length必须相同,你的x y 可不一定相同哦。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange二维图和三维图 についてさらに検索

タグ

質問済み:

2023 年 5 月 17 日

回答済み:

2023 年 5 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!