How to plot my u-solution along y coordinate at constant x coordinate?
1 view (last 30 days)
Show older comments
I want to plot my u solution of pde nonlinear along y coordinate at constant x coordinate. The plot will be along the line of [xmax/2,ymin] [xmax/2,ymax]. I did not understand the nonlinear heat transfer example plotAlongY(p,u,0);, what does the "0" means inside the bracket?
I tried the answer from Bill Greene (below), but I got error. plotAlongLine(p, u, [0,.5], [1,.5], 25); function plotAlongLine(p, u, xy1, xy2, numpts) x = linspace(xy1(1),xy2(1),numpts); y = linspace(xy1(2),xy2(2),numpts); F = TriScatteredInterp(p(1,:)', p(2,:)', u); uxy = F(x,y); figure; plot(x, uxy); end
Please help me. Thank you.
0 Comments
Answers (0)
See Also
Categories
Find more on Geometry and Mesh 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!