Displaying multiple Outputs?

7 Ansichten (letzte 30 Tage)
Bryce Harris
Bryce Harris am 16 Nov. 2018
Kommentiert: Star Strider am 16 Nov. 2018
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.

Akzeptierte Antwort

Star Strider
Star Strider am 16 Nov. 2018
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 Kommentare
Bryce Harris
Bryce Harris am 16 Nov. 2018
Thank you guys
Star Strider
Star Strider am 16 Nov. 2018
As always, my pleasure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by