Displaying multiple Outputs?

3 views (last 30 days)
Bryce Harris
Bryce Harris on 16 Nov 2018
Commented: Star Strider on 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.

Accepted Answer

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

Sign in to comment.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!