MaplePrimes Questions

Here the code for BVP, but there is a singularity how to avoid it

a:=-0.1:alpha:=0.1:
dsys:={diff(u(r),r,r)+(1-alpha)/r+r^(alpha-2)*diff(u(r),r)=a};

res1:=dsolve(dsys union {u(-1)=0,u(1)=0},numeric,output=listprocedure);

plots[odeplot](res1,[[r,(u(r))]],-5..5,axes=boxed,tickmarks = [3, 2], color = black, thickness = 1, linestyle = solid, titlefont = [Helvetica, roman, 18], labeldirections = [horizontal, vertical], labelfont = [Helvetica, roman, 24]);

 

How I can show function w, on the 3d surface?

I want to show w (a function that shows mode shape or shows boundary condition) on the surface of the following plot3d?

This function changes the coordinates of some points and creates a different shape. this behavior occurs when geometry experiences some vibrational behavior.
Thanks

plot.mw

 

Dear administration, I hope you all are good, why my question have been deleted? Even my important question on legends was deleted.

Two questions posted by AHSAN have just been deleted.
They were somewhat redundant with a previous one, which probably justifies their deletion.
Nevertheless, some had given AHSAN answers or replies: in this case, could the answers not be kept in some place? Perhaps in the question that the "eraser" thought was the original question?

Hello, 

How can I solve this equation in Maple?

Please help me?

 

Dear all,

I have 3 ODE's that I solved with the use of a for loop that cycles through different IC's. The purpose of this is so that I can compare the solutions with different IC's. I have three dependent variables (h1(z), h2(z), h3(z)), and one independent variable (z). The loop that I created looks like this:

_Omega_r := 10^(-5);
n := 10;
for i from 0 to n do:
    h10[i] := 1-0.16666667e-1*i;
    h20[i] := 1-(.7*0.16666667e-1)*i;
    h30[i]:= 3-h10[i]-h20[i];
    ans := dsolve([eq2, eq3, eq4, h1(0) = h10[i], h2(0) = h20[i], h3(0) = h30[i]], {h1(z), h2(z), h3(z)}, numeric, output = listprocedure);
    h1_sol[i] := rhs(ans[2]);
    h2_sol[i] := rhs(ans[3]);
    h3_sol[i] := rhs(ans[4]);
    print(i);
end do

Here, h10[i], h20[i] and h30[i] are my initial conditions. I use h1_sol[i], h2_sol[i] and h3_sol[i] to make plots of the solutions:

I make two different types of plots - one type has only the different solutions for h1(z) with all initial conditions:

h1plot := plot([seq(h1_sol[i](z), i = 0 .. 10)], legend = [h1(0) = h10[0], h1(0) = h10[1], h1(0) = h10[2], h1(0) = h10[3], h1(0) = h10[4], h1(0) = h10[5], h1(0) = h10[6], h1(0) = h10[7], h1(0) = h10[8], h1(0) = h10[9], h1(0) = h10[10]], title = "z versus h1(z) for different initial conditions", labels = ["z", "h1(z)"]);

And the other uses one set of initial conditions, but all three h1(z), h2(z), h3(z):

allplot1 := plot([seq(h1_sol[i](z), i = 2), seq(h2_sol[i](z), i = 2), seq(h3_sol[i](z), i = 2)], title = [typeset(h(z), " versus ", z, " (case 2)")], labels = [z, h(z)], legend = [typeset(h[1](z), " with ", h1__0 = h10[2]), typeset(h[2](z), " with ", h2__0 = h20[2]), typeset(h[3](z), " with ", h3__0 = h30[2])]);

Now, all of this works wonderfully. I managed to do everything I wanted. Except that I have been struggling figuring out how to extract the data from the plots into a .dat file into different columns. With the code that I did write, if I use it on the first plot, I end up getting 2 columns, one for z and one for h1(z) (for example), but there should be 11 columns (one for z and 10 for h1(z) with different initial conditions). How would I go about to extract the data of multiple plots into one .dat (or .xls, or .csv or whatever) file? What I did:

write := proc (plotname, filename)
    local fd; fd := fopen(filename, WRITE, TEXT);
    writedata(fd, convert(op([1, 1], plotname), matrix));
    fclose(fd);
end;

write(h1plot, `zvsh1GR.dat`)

Alternatively, if there is a way to use the solution in Maple directly without extracting first (I need to use the solutions for h1(z), h2(z), h3(z) to plot different equations that are dependent on these variables), that would be great. For example, I would like to use these three variables in an equation that uses both the derivatives of all three the variables and the variables themselves as is. For example:

q (z)= (diff(h1(z),z)+diff(h2(z),z)+diff(h3(z),z))/(h1(z)+h2(z)+h3(z))

And then I want to plot q(z) vs z.

I'm sorry if this is a lengthy question (or one with a simple solution) - I am still learning Maple.

My Maple file:
Solving_GR_f(R)_ne_2.maple

Maple worksheet: Solving_GR_f(R)_ne_2.mw

Hi, does anyone help me to solve some matrix question in maple. pls have look on my worksheet

 

Help_Matrix.mw

How to do multivariate polynomial regression using Maple?

Kind help with the needful

Any sample code with 4 independent vatiables and one dependent variable with less data may be useful.

Kind help. 

For the following equation, 

eqn:=1.35150599852371*10^10 = 2.45634141630387*10^7*x + 50.7216626470812*x^4 + 6.20132964743411*10^7*x^2 + 1.26328819483651*10^10 + 112528.172146835*x^3

using solve gives 4 real solutions

3.56789020177967, -3.99013603029896, -1017.86074450970, -1200.25966528805

Using RealDomain[solve] gives an error:

RealDomain[solve](eqn,x,allsolutions=true);
Error, (in assuming) when calling 'RootOf'. Received: 'the input range -1200.259665 .. -1200.259665 is invalid'

This is partly a bug alert, but any insight would be appreciated.



 

Hello, 

1) Is it possible to transform a lib package into a mla package ?

2) I add the file here :

 maple.zip

May you manage to make the transformation and give me an access to the code inside ?

Thank you for your help

 I am new to Maple.  I will appreciate any assistance with a Maple iterative procedure to find the value of s at a given temperature for F(x,r,s, T) = 0 with all other variables fixed.  F is a complicated function.  

 

Is possible to operate Grid Computing Toolbox together with Maple on one local multicore machine?

If yes, what is the proper instalation/configuration procedure on Windows or Linux?

Hi,

As the title says, I was trying to load a library that is stored in .lib file to use in a maple cloud application. Locally, I think i can get it to work, but I don't know how to use this external file on the cloud itself.

Does anyone know if this is possible?

Thanks!

Is it possible to draw objects in Maple graphically, that are defined by parameters?

Like rectangles with width and height, circles with a radius, triangles, etc.

I want to get data from 2D plots and 3Dplots and want to export to Excel or Matlab.

 

For  2D plots, the following code works. The data can be exported to Excel. No problem.

restart: 

P1:=plot(sin(x));
data1:=op([1,1],P1); 

ExcelTools:-Export(data1, "C:/Users/student/Desktop/XLdat.csv", "Sheet1", "A1");
ExportMatrix("C:/Users/student/Desktop/XLdat.csv", data1); 

 

1. But the following code doesn' t work for exporting the data to Matlab. Why?

restart: P1:=plot(sin(x));
dataMat:=plottools:-getdata(P1);
dataMat2:=convert(dataMat,Matrix):
ExportMatrix( "test.mat",dataMat2, target=Matlab);

 

 

 2. How to write a code in order to get data from the 3D plot and to export to Excel or Matlab?

For example;

restart:
z=sin(x)*cos(y);
P2:=plot3d(z);

 

 

Maple 2020.2

First 436 437 438 439 440 441 442 Last Page 438 of 2428