Muhammad Usman

235 Reputation

5 Badges

11 years, 151 days
Beijing, China

MaplePrimes Activity


These are replies submitted by Muhammad Usman

@acer , Thank you I resolve it, Now just want to ask how I can show the x-axis value and t-axis value as mentioned bellow:

@acer , Now I want to plot the contour plot of the sequence for in x and t as I tried above. 

xData := [0., 0.04995839572*sin(x), 0.09966865249*sin(x), 0.1488899476*sin(x), 0.1973955598*sin(x), 0.2449786631*sin(x), 0.2914567945*sin(x), 0.3366748194*sin(x), 0.3805063771*sin(x), 0.4228539261*sin(x), 0.4636476090*sin(x), 0.5028432109*sin(x), 0.5404195003*sin(x), 0.5763752206*sin(x), 0.6107259644*sin(x), 0.6435011088*sin(x), 0.6747409422*sin(x), 0.7044940642*sin(x), 0.7328151018*sin(x), 0.7597627549*sin(x), 0.7853981634*sin(x)];

where the first output is against when t=0, the second when t=0.05, the third when t=0.1 and so on the last is for t=1. 

@acer , I also tried surfData instead of f in the plots:-densityplot but not working this idea.

@acer , In the following I got the error "Error, (in Plot:-ColorScheme) unable to produce gradient shading from given data"

restart;
with(plots);
with(plottools, polygon);
with(ColorTools, Color);
xData := [0., 0.04995839572*sin(x), 0.09966865249*sin(x), 0.1488899476*sin(x), 0.1973955598*sin(x), 0.2449786631*sin(x), 0.2914567945*sin(x), 0.3366748194*sin(x), 0.3805063771*sin(x), 0.4228539261*sin(x), 0.4636476090*sin(x), 0.5028432109*sin(x), 0.5404195003*sin(x), 0.5763752206*sin(x), 0.6107259644*sin(x), 0.6435011088*sin(x), 0.6747409422*sin(x), 0.7044940642*sin(x), 0.7328151018*sin(x), 0.7597627549*sin(x), 0.7853981634*sin(x)];
tData := [seq(0.05*n, n = 0 .. upperbound(xData) - 1)];
xtPoint := unapply([x, abs(xData[n]), abs(tData[n])], x, n);
xtLine := unapply([seq(xtPoint(x, n), n = 1 .. upperbound(tData))], x);
N := 100;
x0 := 0;
xf := Pi;
dX := (xf - x0)/(N - 1);
surfData := [seq(xtLine(dX*n + x0, round(n*upperbound(xData)/N + 1)), n = 0 .. N - 1)];
f := plots:-surfdata(surfData, labels = ["x", "xData", "tData"], labelfont = ["Times New Roman", 15], orientation = [84, 21, 160], size = [500, 500]);
a, b, c, d := x0, xf, 0, 1;
zmin := min(surfData);
zmax := max(surfData);
display(densityplot(f, x = a .. b, t = c .. d, 'style' = ':-surface', 'colorscheme' = ["zgradient", ["Blue", "Red"], 'colorspace' = "HSV"]), seq(polygon([[0, 0], [0, 0]], 'thickness' = 0.3, 'legend' = sprintf("%5.1E", z), 'color' = Color("HSV", [:-Hue(Color("Blue"))*(zmax - z)/(zmax - zmin), 1, 1])), z = zmax .. zmin, 'numelems' = 24), 'legendstyle' = ['location' = ':-right'], 'size' = [580, 500], labels = ["", ""], 'axis[2]' = ['location' = ':-high', 'tickmarks' = [], 'color' = "White"], 'axis[1]' = ['location' = ':-low', 'tickmarks' = [], 'color' = "White"]);

@acer , I also have registered the Maple 2022 version

@acer , yes I am using Maple 2015

@Carl Love dear Sir, I have seen anything wrong with the epsilon value as I mentioned above.

@mmcdara thank you, but you used different initial conditions. Can you examine the solution with my ICs?

Num_PDE.mw

@Carl Love thank you! I need the results for spacestep=1/200 and timestep=1/200. But can't find it. Can see my file and resolve my issue to get the result. Thanks

Num_PDE.mw

@acer thank you for your response.

@Rouben Rostamian thank you for your response. Actually, I used MatrixEquation1 for higher M (for M>50) it takes a lot of time on the other hand MatrixEquation2 produces the solution in less time. That's why I want to use MatrixEquation2 (to save time). But the problem is it gives a lesser number of solutions. Kindly guide me on how I can obtain the same number of solutions by using MatrixEquation2 as I obtained in MatrixEquation1. I am waiting for your positive response. Please take care.

@Rouben Rostamian thank you for your response. Now, I want to compute the eigenvalues of matrix B (highlighted in red color in the attached file) taking its entries as integers (mentioned as MatrixEquation1) and taking its entries as decimals (mentioned as MatrixEquation2). The problem is that in both ways I obtained a different number of eigenvalues (obtained lesser values in the case of using MatrixEquation2). I want the same values in both ways since I am using the same matrix (B). Kindly guide me in this matter. I am waiting for your positive response. Please take care and thanks

EIGEN_VALUES.mw

@tomleslie that's great and many thanks. Kindly let me know where we adjust this sequence in the above shared code.

@tomleslie in addition, the actual domain of the problem is 0<=eta<=1 and 0<=X<=1, therefore I need the output of contour plot in this domain instead of [0,4]. 

@tomleslie thanks for your response. I need the dat file because I want to use that files to plot the contour in tecplot for better resolution. 

1 2 3 4 5 6 7 Last Page 2 of 11