필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How do I get this function program to display "v" instead of "ans"?

조회 수: 1 (최근 30일)
Aaron
Aaron 2013년 9월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
function v = piecewise_fun(t)
if 0 <= t & t <= 8
v = (10.*t).^2 - (5.*t)
elseif 8 <= t & t <= 16
v = 624 - 5.*t
elseif 16 <= t & t <= 26
v = 36.*t + 12.*(t-16).^2
elseif t > 26
v = 2136*exp(-0.1.*(t-26))
end
end

답변 (1개)

the cyclist
the cyclist 2013년 9월 9일
Put a semicolon at the end of the statement, to suppress the output there. Then, use the disp() function. See
doc disp
for details.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by