Displaying multiple Outputs?

조회 수: 15 (최근 30일)
Bryce Harris
Bryce Harris 2018년 11월 16일
댓글: Star Strider 2018년 11월 16일
function [YPV,YPDV,YPR,YPDR,NPV,NPDV,NPR,NPDR] = turning_maneuver(L,B,T,C,U,S,t,time)
YPV = -pi*(T/L)^2*(1+0.4*C*(B/T))
YPDV = -pi*(T/L)^2*(1+0.16*C*(B/T)-5.1*(B/L)^2)
YPR = -pi*(T/L)^2*(-0.5+2.2*(B/L)-0.08*(B/T))
YPDR = -pi*(T/L)^2*(0.67*(B/L)-0.0033*(B/T)^2)
NPV = -pi*(T/L)^2*(0.5+2.4*(T/L))
NPDV = -pi*(T/L)^2*(1.1*(B/L)-0.041*(B/T))
NPR = -pi*(T/L)^2*(0.25+0.039*(B/T)-0.56*(B/L))
NPDR = -pi*(T/L)^2*(1/12+0.017*C*(B/T)-0.33*(B/L))
end
Howdy, above is a function I have created in matlanb I am trying to figure out how to get the function to display all of the argument outputs because later this function will be put in a script. Right now I am just running the function and trying to get the function to display all of the answers. I have read a little bit on the forums but I am still unsure on how to display all the outputs instead of just the first. I would also like to store these values as variables.

채택된 답변

Star Strider
Star Strider 2018년 11월 16일
With all the argument variables present in your workspace, call it in a script as:
[YPV,YPDV,YPR,YPDR,NPV,NPDV,NPR,NPDR] = turning_maneuver(L,B,T,C,U,S,t,time);
That should return all the outputs to your workspace.
  댓글 수: 3
Bryce Harris
Bryce Harris 2018년 11월 16일
Thank you guys
Star Strider
Star Strider 2018년 11월 16일
As always, my pleasure.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by