matlab - Plot a graph, combining solutions for multiple domains -
i have question plotting. try make plot 2 solutions took them solving 2 pdes on different spatial domains. in first domain, have solve coupled system of pdes discretization of x =linspace(0,1,50).
in addition, in second domain, solved pde spatial discretization of x = linspace(1,2).
how can plot solutions u1 , u2 1 graph?
the main point overall solution has discontinuity , want vertical line, step function.
i have seen page plotting function behaves differently on different domains in matlab, there way, because not have specific expression of each function.
you can combine vectors 1 big vector , plot combined vector follows:
x1 = linspace(0,1,50); x2 = linspace(0,2); u1 = % solution of pde x1 u2 = % solution of pde x2 x = [x1 x2]; u = [u1 u2]; plot(x, u);
Comments
Post a Comment