MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hey all,

as a newbie to Maple I would likt to solve the electrical circuit, which is attached to this post. From the theory one can derive the following 6 equations:

(A)  u[smooth](t) = -(int(i[smooth](tau), tau = 0 .. t))/C[smooth]-u[smooth](0)

(B) u[smooth](t) = R[komp]*i[komp]

(C) u[ckomp](t) = (int(i[load](tau), tau = 0 .. t))/C[komp]-(-u[ckomp](0))

(D) u[loadt](t) = R[load]*i[load]

(E) u[smooth](t) = u[ckomp](t)-u[load](t)

(F) i[komp](t) = i[smooth](t)-i[load](t)

My aim is tio get either the voltage u[load](t) or the current i[load](t). Beside all parameter values I know the inital voltages at the capacities, called u[smooth](t=0) and u[ckomp](t=0). Both values are not zero in general!!!!

Do you have any idea how I can solve this with Maple? First I habe tried to solve this with "solve()" but get a solution with "solve()", I need to derive the equations to get rid of the integrals. But through the derivation my initial condictions vanish, too.
I have attached my Maple worrksheet as well: igl.mwigl.mw

BR

 Sebastian

P.S.: Here is the circuit:

 

 

There are quite a few useful resources, like TAs and documents in the startup page, however, I can only access them by clicking the links. Where are those files located on the disk? (Mac OSX)

Hi

I want to plot this equation to obtain 5 curves, then the maximum point  of eath curves link together.

But I can not plot this equation;anybody can help me?

restart; Eq := x-(r+3.1*10^7*exp(-11616/(1.98*T)))/(3.1*10^7*exp(-11616/(1.98*T))+1.8*10^18*exp(-29691/(1.98*T))) = 0; R := [0, 0.1e-2, 0.1e-1, .1, 1.6]; plots[implicitplot]([seq(eval(Eq, r = R[i]), i = 1 .. nops(R))], T = 0 .. 500, x = 0 .. 2, color = [red, blue, green, yellow, black], gridrefine = 5)

 

 

 

If I have some data, how would I determine the best normal distribution fit?

Hi:

I would like to slightly modify the "Explore" command -- I find it extremely useful, but the layout often doesn't work well for me (my typical use case is say 12 plots with ~10 parameters that vary). The problem is that the default alignment the columns of the table that contains a matrix of plots is "Center" and my plots don't fit on the screen properly (no matter how I play with sizes, placement, etc) and I would like it to be "Left" aligned --- aligning things manually (via right click) after the explore command is executed is possible, but painful, given that I often change my code.

... bottom line is that I would like to be able to re-define the "Explore" command.

I tried doing so by first calling:
showstat(Explore);

... then removing all the numbers, renaming the proc to sat MyExplore, declaring it (i.e. so maple understands it) and for now using that instead of the old Explore in my program (with no actual code changes for now). The problem is that I get the following error:

Error, (in DocumentTools:-Layout:-Table) number of Column arguments, 3, exceeds total column span, 1, computed from Rows' Cells

I think, somehow maybe showstat is not showing the full thing? or maybe it is part of a more complicated module? or maybe by removing the numbers the formatting got screwed up (i was careful here)?

So my question:

How would I define my own function "MyExplore" that (for now) contains exactly the same code and functionality as the built-in "Explore"?

thanks!

Hi Clever guys,
I am sorry if I asked for too much, but I am really in a big problem, I had a family problem and I didn't attend most of the lectures, and now I have to hand in an assignment before easter hollydays, and to be honest with you, I don't know from where to start, I know I will have to understand this stuff, but now I don't have enough time to do the assignment, so if anyone can help me, please please, for you guys it will maybe take 20min to do it, i ll need days and days and in the end it will be all wrong. I am going to try to do the other questions, there are 5 questions :(  
Please help me , I am really not a very bad student that just want to copie, but if nobody does this for me this time I will fell, please do this question for me please.. maybe you will say start it and then ask to check if it is correct, I am really trying my best, please.

that is one question:


By integrating a third order Newton Gregory Polynomial, derive Simpson’s

three eights rule given by

∫ f(x)dx (from x0 to x3 ) =3/8*ℎ(y0 + 3y1 + 3y2 + y3)

(b) Find the order of accuracy of Simpson’s rule and Simpson’s three eights rule.

(c) Write procedures to evaluate

∫ f(x)dx   (from x0 to xn) to a given number of decimal places using

i) Simpson’s rule.

ii) Simpson’s three eights rule.

The data to be input should be

i) The function f(x).

ii) x0 and xn .

iii) the number of decimal place accuracy required for the solution.

The output should comprise

 i) The number of strips used.

 ii) the value if the integral.





thank you very much 

Hi,

 

Lets say we have some expression like

0.5* t^5 * r^-1 *V

 

is there some way in maple to determine the power of the variable t ?

My goal is to realize a procedure [lets call it PowerOfT() ]  , so that

 

PowerOfT( 0.5* t^5 * r^-1 *V) = 5

 

Thank you very much for your help.

 

 

I want to translate my maple code with matrice multiplication  to C code. But the command  "Multiply" cannot be translated. So I want to edit the function translation by myself. I use "AddFunction" command to create a new function  "Multiply" and want to specify its corresponding C code.

 


f := proc ()
local x,y;
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a,b;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

 

But when I run it, the "Multiply" function cannot be translated.  The result is:

 

Warning, type signature [CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions()), CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions())] for function Multiply is not recognized
void f (void)
{
  int x[2][2];
  int y[2][2];
  x[0][0] = 1;
  x[0][1] = 2;
  x[1][0] = 3;
  x[1][1] = 4;
  y[0][0] = 1;
  y[0][1] = 3;
  y[1][0] = 4;
  y[1][1] = 2;
  Multiply(x, y);
  ;
}

I don't know why "Multiply(x,y)" cannot be translated.

If I put two "Multiply(x, y)" in the procedure, like this:


f := proc ()
local x,y;

Multiply(x, y);
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

THe result is:

Warning, cannot resolve types, reassigning x's type
Warning, cannot resolve types, reassigning y's type
Error, (in CodeGeneration:-IssueError) type 'Matrix' cannot be translated to target language

I don't know why type 'Matrix' cannot be translated.

 

 

how to customize/invert the foreground/background color scheme in Maple?

 

The black on white is killing my eyes and also wasting energy, white on black is much better on the eyes and conserves energy (pixel brightness), imho

 

thanks in advance!

 

 

I want to draw plots with big numbers in axes

but when I change font sizes it dont work

please help me

Thanks

restart;
eta := 3:
beta := t[1]*(H-t[1])/H^2:
for i from 5 to 10 do H := i:
PL[i] := plot((t[1]^4+2*eta*beta*(2-beta)*H^4+eta^2*(H-t[1])^4)/(eta*(H-t[1])+t[1]), t[1] = 0 .. H, y = 0 .. 3000, color = black, axesfont = [Font(14), Font(14)], size = [560, 500]) end do:
with(plots): display({seq(PL[j], j = 5 .. 10)})

 

Hello!

I performed a calculation where the output was a matrix that Maple said was too big to display explicitly. So, this output was just a summary. Specifically, something like this:

 

 

How can I save/export the data inside it to another matrix so that I can manipulate it while staying within Maple?

 

I can export to an external file using

and then reimport the data back into Maple. But this is cumbersome.

I can also see the data on my screen by double-clicking on the matrix. But I haven't been able to manage to copy & paste it within Maple or transfer it to another matrix so I can manipulate the data. How do I do this? I'd like to stay within Maple to avoid the hassle of exporting data to Excel & then reimporting it.

Thanks,

Damian.

given the following:

param:= {mu[2] = (1600), mu[4] = (1500)}
R := unapply(1/(1+exp((1/50)*x)), x);

prior := evalf(expand(eval(eval(R(abs(mu[4]-mu[2])), `` = (x->x)), param)));
   

I need to keep the paramaters encapsulated. I would like this last step to output the answer 0.1192029.... but the abs function doesn't let me

I need a list version of Contourplot. I have a list in the format [[z1,x1,y1],[z2,x2,y2],...[zn,xn,yn],...]

where z represents some data value at coordinate (x,y). Basically I need a 2D figure with the x and y values shown on the axes and the z-value represented in a color code. Just like "contourplot" except in my case I cannot use it since I do not know the general function of two variables but only the list  with the data points. Is this possible with a built in Maple command?

 

Thanks

 

 

Hello I download maple2015 today but I dont know how can I work with it ?  how can I write math phrases?

Please help me soon!!!!

I have this (which finds each Fourier term of a sequence)

term := proc(lst,k::integer)
    local n;
    n := nops(lst);     
    seq(lst[m+1]*exp(-I * 2*Pi/n *(k*m)),m=0..n-1);
end proc;

Now I call it as

term([1,2,3],1);

and it returns

So it evaluated and convert the exp(-I * 2*Pi/n *(k*m)) terms. I wanted to keep these as is, so I can compare result with textbook. Then do simplify if I wanted to above output. 

I can do that if I use small pi instead of large Pi, like this

term := proc(lst,k::integer)
    local n;
    n := nops(lst);     
    seq(lst[m+1]*exp(-I * 2*pi/n *(k*m)),m=0..n-1);
end proc;

and now r:=term([1,2,3],1); return

Which is what I wanted, but with Pi instead of pi.  now how would I evaluate the above?

I tried to use subs to replace small pi with large Pi, but it does not work

subs(pi=Pi,r); #error

Then I tried eval, which worked

eval(r,pi=Pi);

So, I can use the above method.

My question is: Is the above a common way to handle such case? Is there another way to use Pi but at the same time prevent Maple from automatic simplification of the exp() terms?

 

 

 

 

3 4 5 6 7 8 9 Last Page 5 of 1137