Displaying multiple Outputs?

3 visualizaciones (últimos 30 días)
Bryce Harris
Bryce Harris el 16 de Nov. de 2018
Comentada: Star Strider el 16 de Nov. de 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.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by