HI friends.I have a question:what is the difference between imshow & imagesc in this code and why the time reduce??
1 回表示 (過去 30 日間)
古いコメントを表示
clear all;
% close all;
clc
tic
for n=1:100
disp(n)
for i=1:50
for j=1:50
matrix(5*i-4:5*i ,5*j-4:5*j)=rand;
% matrix(10*i-9:10*i ,10*j-9:10*j)=rand;
% matrix(4*i-3:4*i ,4*j-3:4*j)=rand;
end
end
imshow(matrix);
imagesc(matrix);
% colormap(gray)
% colorbar
% matrix=100*floor(5*matrix);
% matrix=83*matrix;
randmatrix{n}=matrix;
% matrix=randmat{n};
% imshow(matrix)
% matrix=floor(4*matrix);
% matrix=83*matrix;
% randmatrix{n}=matrix;
end
toc
1 件のコメント
Guillaume
2018 年 5 月 1 日
There two different functions, so I wouldn't expect them to take the same time.
Isn't your question answered simply by looking at the documentation?
I would recommend you reduce the clutter in question by removing all these useless comments.
回答 (1 件)
sloppydisk
2018 年 5 月 1 日
編集済み: Guillaume
2018 年 5 月 1 日
This was answered here: https://mathworks.com/matlabcentral/answers/72130-what-s-the-difference-between-imagesc-and-imshow .
Guillaume's edit: fixed link
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!