Displaying multiple Outputs?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!