- #1
Agent M27
- 171
- 0
I am working in MATLAB and have created a function, which I will call in the command window. Here is the code:
All I want is to see the image produced and the time it takes for the function to evaluate, however it is printing the entire matrix, it is not printing the time it takes, and it does show the image so no problem there. The problem is that the images are very large, roughly 1000 x 1000 matrices, so I don't want all of that in the command window. I have used semicolons everywhere but still cannot figure out how to suppress 'y'. Any assistance is much appreciated.
Joe
Code:
function y=intensity(img)
tic
im = imread(img);
R = im(:,:,1);
G = im(:,:,2);
B = im(:,:,3);
r = im2double(R);
g = im2double(G);
b = im2double(B);
rgbsum = r + g + b;
intensity = rgbsum/3;
y = intensity;
toc
disp(toc)
imshow(y)
All I want is to see the image produced and the time it takes for the function to evaluate, however it is printing the entire matrix, it is not printing the time it takes, and it does show the image so no problem there. The problem is that the images are very large, roughly 1000 x 1000 matrices, so I don't want all of that in the command window. I have used semicolons everywhere but still cannot figure out how to suppress 'y'. Any assistance is much appreciated.
Joe