I am working in matlab and have created a function, which I will call in the command window. Here is the code:(adsbygoogle = window.adsbygoogle || []).push({});

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.Code (Text):

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)

Joe

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Semicolon not suppressing MatLab output

Loading...

Similar Threads - Semicolon suppressing MatLab | Date |
---|---|

Matlab Coding angular spectrum of waves in a fluid | Today at 7:30 AM |

How to program this in Matlab | Feb 28, 2018 |

Matlab Making a short test for self-adjointness | Feb 23, 2018 |

Matlab: Suppressing the output | May 31, 2012 |

Suppressing result using 'varname_' in Matlab | Mar 2, 2012 |

**Physics Forums - The Fusion of Science and Community**