how suppress output from a user defined function ?

4 views (last 30 days)
function [x,y] = myfn(a,b,c)
I intend to use the values of x and y for consequent operations.However the values of x and y are in matrix with big dimensions.As a result the command window is full of continuously changing values.I need to get rid of that.
Any way to suppress the display of x and y in command window but still use the values ?

Accepted Answer

Matt Tearle
Matt Tearle on 22 Mar 2013
I don't understand why the values are being displayed in the first place. As long as everything ends with a semicolon, there should be no display. Is there something in the function that explicitly displays something? If so, why?
  2 Comments
Niranjan Satam
Niranjan Satam on 22 Mar 2013
Matt Tearle,
My apologies.Semicolon was the missing thing.That was silly of me.Thanks for pointing it out.
Matt Tearle
Matt Tearle on 22 Mar 2013
Glad it was that simple. Sometimes it's easy to miss things that are inside functions inside functions inside functions...

Sign in to comment.

More Answers (0)

Categories

Find more on Historical Contests in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!