[m n]=size(I)subplot(2,1,1),imshow(I);title({'原图像'});y1=I(4,:);y2=I(5,:);y3=I(6,:);y4=I(7,:);y5=I(8,:);y6=I(9,:);y7=I(10,:);y8=I(20,:)*2;subplot(212)plot(1:n,y8)

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 03:49:54
[m n]=size(I)subplot(2,1,1),imshow(I);title({'原图像'});y1=I(4,:);y2=I(5,:);y3=I(6,:);y4=I(7,:);y5=I(8,:);y6=I(9,:);y7=I(10,:);y8=I(20,:)*2;subplot(212)plot(1:n,y8)
x]KP❛t'_ьTua$$BP#/}uWHtѽws8&O9HhYIIZ xg99Oa_,ȅl9zWE>b\@]P* QE@UG!J\G,WJTv}YwJ竁ۏv:PHsl^2O?~2q9ppZڑ waX5{4ߦ>Q)Hr.'|17&<[=m(aFtC:%|W-ɫߕk/tRPSS;8G

[m n]=size(I)subplot(2,1,1),imshow(I);title({'原图像'});y1=I(4,:);y2=I(5,:);y3=I(6,:);y4=I(7,:);y5=I(8,:);y6=I(9,:);y7=I(10,:);y8=I(20,:)*2;subplot(212)plot(1:n,y8)
[m n]=size(I)subplot(2,1,1),imshow(I);title({'原图像'});y1=I(4,:);y2=I(5,:);y3=I(6,:);y4=I(7,:);y5=I(8,:);y6=I(9,:);y7=I(10,:);y8=I(20,:)*2;subplot(212)plot(1:n,y8)

[m n]=size(I)subplot(2,1,1),imshow(I);title({'原图像'});y1=I(4,:);y2=I(5,:);y3=I(6,:);y4=I(7,:);y5=I(8,:);y6=I(9,:);y7=I(10,:);y8=I(20,:)*2;subplot(212)plot(1:n,y8)
size返回的m*n是矩阵i的维数;subplot(2,1,1),表示话2行1列的图,把imshow放在第一个位置
imshow(I)就是直接按I的灰度级画出图.y8=I(20,:)*2表示y8是I的第20行的数据的2倍
最后会把矩阵I的第20行的数据的2倍(即为y8)画出来