필터 지우기
필터 지우기

how suppress output from a user defined function ?

조회 수: 3 (최근 30일)
Niranjan Satam
Niranjan Satam 2013년 3월 22일
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 ?

채택된 답변

Matt Tearle
Matt Tearle 2013년 3월 22일
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
Niranjan Satam
Niranjan Satam 2013년 3월 22일
Matt Tearle,
My apologies.Semicolon was the missing thing.That was silly of me.Thanks for pointing it out.
Matt Tearle
Matt Tearle 2013년 3월 22일
Glad it was that simple. Sometimes it's easy to miss things that are inside functions inside functions inside functions...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by