How can i get the numerical value of a variable?
1 view (last 30 days)
Show older comments
I'm using the ode45 (x,y) for solve an open channel flow problem (plot the surface profiles). It is working, I've already do that but I need the flow depth numerically (y) at the end of my channel (x=xmax). How can I get it?
0 Comments
Accepted Answer
Star Strider
on 8 Nov 2014
If you need the very last values of your x and y vectors, use end (or length or size as alternatives), for example:
flow_depth = y(end,:);
or:
flow_depth = y(length(x),:);
4 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!