MaplePrimes Questions

Hello,

I am trying to pass the graphics to .txt format so that I can plot them in Origin (OriginLab).

npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PA[i] := x[i](t);
    printf("%e %e\n", t[i], PA[i]);
    fprintf(fd, "%e %e\n", t[i], PA[i]);
end do;
0.000000e+00 

Error, (in fprintf) number expected for floating point format
fclose(fd);
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PB[i] := x[i + n](t);
    printf("%e %e\n", t[i], PB[i]);
    fprintf(fd, "%e %e\n", t[i], PB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qA[i] := x[i + 2*n](t);
    printf("%e %e\n", t[i], qA[i]);
    fprintf(fd, "%e %e\n", t[i], qA[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qB[i] := x[i + 3*n](t);
    printf("%e %e\n", t[i], qB[i]);
    fprintf(fd, "%e %e\n", t[i], qB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Tg[i] := x[i + 4*n](t);
    printf("%e %e\n", t[i], Tg[i]);
    fprintf(fd, "%e %e\n", t[i], Tg[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Ts[i] := x[i + 5*n](t);
    printf("%e %e\n", t[i], Ts[i]);
    fprintf(fd, "%e %e\n", t[i], Ts[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format

trabalho_final_2019.mw

Hello,

I want to write a code about numerical solving N(for example N=150) coupled differential equations (ODE ) with M boundary conditions in Maple but I do not know how to do it and I cannot find anything useful. in particular, I have trouble inserting boundary conditions which are a lot for N coupled difrential equations.

Does somebody have a code script on this matter? please let me know.

Thanks a bounch in advance.

I would like to know how to create a group with some elements (numbers) {1,2,4,...} with a defined operation on it like X_42 (modular  multiplication by 42).

Hi everyone:

I'm going to write code to give me the following matrix A?

 

 

Hello everyone, thank you in advance

I am trying to plot two functions in the same graph. I didn't realize how to copy the real functions here but:

At the same 3D plot

I need to use the function F1(x,xi,k,B) for values of x*xi <6  and other function F2(x,xi,k,B) for values of x*xi  >= 6

Thank you again and sorry for my rusty English.
 

I attached a file with these 2 functions Functions_MAPLE_PLOT_TOGETHER.mw

What is the command to yield the expansion of Z^N in terms of x and y.

Z complex = x+iy,

N integer >1

e.g. Z^2 = x^2 - y^2 + 2.i.x.y

 

could you just delete the post !!!!!!!!!!!!!!!!!!!!!!!!!!!x!xxxx!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Is it possible to solve an expression like in the picture below?:
I´ve tried to figure it out at maplesoft.com but I could not find anything that worked...

I´ve also attached the equation as a file. 


 

 

restart

solve(Y = G__B*D1*G__A*G__f/(G__A*G__B*G__M*G__c+G__A*G__B*G__R+1)+G__B*G__A*G__c*Y__sp/(G__A*G__B*G__M*G__c+G__A*G__B*G__R+1)+G__B*D1*G__d/(G__A*G__B*G__M*G__c+G__A*G__B*G__R+1), Y/D1)

Warning, solving for expressions other than names or functions is not recommended.

 

 


 

Download question_regarding_solve_in_maple.mw

Can you please explain which optimization package is better from your experience

1 maple

2 matlab

3. mathematica

4. gams studio

5. gurobi

or any other

Int1 := int(exp(-z*(R^2*k^2 - b^2*z)/(R*b))/(z*HeunB(0, k^2*R^2/(b*sqrt(R*b)), R^3*k^4/(4*b^3), 0, -sqrt(R*b)*z/R)^2), z = R .. r);

into cylindrical coords with z axis simetry and radius r;

where R, k, b are constants >0;

And HeunB is Maple funtion

I apreciate the exact calculus but maybe an aproximation is ok but or a plot.

Please advise! 
         

Dear all

If we travel in straight lines in R^3. We begin at the point A=(1, 2, 3)
in the direction of the vector (1, 2, 2) and we end at the final point (10, 11, 12).

We made a single 90-degree turn.

Can we sketch a figure and we show the position where we take the turn?

 

Thanks

Dear all

I hope to solve a linear system AX=bk where A is a nxn matrix and X is a nx1 vector and b is a vector from the canonical basis of R^n ( for example in R^3 : b1=[ 1 0 0], b2 =[ 0 1 0] and b3=[ 0 0 1]

 

 

GramMat.mw

Thanks

I am reading a paper which has some useful two-dimensional Fourier transforms in the appendix: for example,

Fourier transform of 1/r = (1/k)*e^(-kz),

where r = sqrt(x^2 + y^2 + z^2) and k =  sqrt(k_1^2 + k_2^2).

My guess is that the author has computed these by taking contour integrals in the upper half-plane and I would like to compute some of these myself but I have many of them to compute and was wondering if it could be done with Maple instead.

For example, could I use Maple to verify that the above 2D Fourier transform is correct and that the inverse 2D Fourier transform takes you back to the original (or almost takes you back).  After that I would then like to feed in the functions which I have to get Fourer and inverse Fourier transforms.

This may be a total newbie question, but is there a way to split an equation and save the right hand side? For example, have a look on what happens without split:

numer(L = 2/3);
"Error, invalid input: numer expects its 1st argument, x, to be of type {list, set, algebraic}, but received L = 2/3"

I thought that "convert"-function might be able to do this, but for example this does not work:

convert(L = 2/3, algebraic)

"Error, invalid input: `convert/algebraic` expects its 1st argument, pr, to be of type procedure, but received L = 2/3"

Please understand that this is a simplified example. The real problem looks like

sol := solve({eq1, eq2,eq3, res}, {L, x1, x2, x3})

The point here is how to convert the sol[1], which is L = numerator/denumerator into --> numerator/denumerator

Taking a copy of the equation works, but this is only an intermediate result, so if the split does not work automatically, Maple cannot compute the problem to the end without human intervention, and since this problem takes a long time to solve, it would be nice if I could just leave Maple to finish the task by itself.

How would I compute the series expansion of cos(x)^n at the point x=0?

First 609 610 611 612 613 614 615 Last Page 611 of 2427