Robert Israel

6577 Reputation

21 Badges

18 years, 217 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

I clicked on "Reply"

It might be helpful if you told us the function you're trying to plot.

Well, you could try piecewise(x*y/(x-y) >= C, undefined, f(x,y)).

I tried it again, and it works now.  I was doing it from home last time and from work this time: I guess my Internet connection may be better here, although I haven't noticed it being slow at home for other applications.

Assumptions never do this sort of thing in Maple: they don't restrict values of variables, they just affect what simplifications can be made.

In a case such as this the simplest way is something like

> implicitplot(f(x,y), x = 0 .. 1, y = 0 .. x);

The range for the first variable (x) must be constant, but that for the second variable (y) can depend on the first.

 

Please just enter your commands in ordinary text (Maple Input, not 2D). It makes it much easier for us.
You appear to be using something that looks like

f:= (rcostheta, rsintheta) -> ...

(with the "theta" as a Greek letter) .  This is wrong, and it's unfortunate that 2D input makes it look like it is right.  what you actually have here are two variables named rcostheta and rsintheta (well, actually `rcosθ` and `rsinθ`) which have nothing to do with r and theta. 

You probably meant r*cos(theta) and r*sin(theta), but that would also be wrong.  When you're defining a function or procedure, the parameter sequence must have the names of the variables, not some expressions involving them.  So it should be

f:= (r, theta) -> ...

 

 

Please just enter your commands in ordinary text (Maple Input, not 2D). It makes it much easier for us.
You appear to be using something that looks like

f:= (rcostheta, rsintheta) -> ...

(with the "theta" as a Greek letter) .  This is wrong, and it's unfortunate that 2D input makes it look like it is right.  what you actually have here are two variables named rcostheta and rsintheta (well, actually `rcosθ` and `rsinθ`) which have nothing to do with r and theta. 

You probably meant r*cos(theta) and r*sin(theta), but that would also be wrong.  When you're defining a function or procedure, the parameter sequence must have the names of the variables, not some expressions involving them.  So it should be

f:= (r, theta) -> ...

 

 

>  How to make codes of Maple in the commentaries, are like those of you?

 I'm sorry, I don't understand this question.

>  How to make codes of Maple in the commentaries, are like those of you?

 I'm sorry, I don't understand this question.

OK. The test applet said I was using Java 6 update 11. I updated to 13. 
I tried Integration.  I find the applets very slow to load.  Finally I was able to double-click in the
text box, backspace to delete the default content, and then type sin(x).  I click on Integrate, and it tells me:


Invalid Worksheet Session

This session has expired, or the worksheet was closed from another window.
Reload Integrals.mw

OK, I'll reload.  Now there are no text boxes at all!

I click again on Integration in the menu on the left.  There are three Java "clocks" turning around where the inputs and output should be.

After several minutes, I can finally enter something.  I click Integrate, and again it tells me Invalid Worksheet Session..

 

You're using omega for two different purposes, it seems: as a table (by assigning to omega[1][6] etc), and as an ordinary variable.  That causes trouble.  Try, for example: 


> omega6[1] := 7.077500000:
> omega6[2] := 26.10450000:
> omega6[3] := 54.41300000:
> omega6[4] := 88.04050000:
>                      
> eta[1][6] := .5785000000e-1:
> eta[2][6] := .7735000000e-2:
> eta[3][6] := .8760000000e-2:
> eta[4][6] := .3143500000e-1:
>
> r[1][2] := .152-.58e-1*I:
> r[2][2] := .262-.80e-1*I:
> r[3][2] := .235-.10e-1*I: 
> r[4][2] := .426-.755*I:
>
> alpha[1,1] := sum((r[n][2]/(omega6[n]^2 - omega^2 + I * eta[n][6] * omega6[n]^2)),n=1..4);

> map(evalc @ Re, alpha[1,1]);

You're using omega for two different purposes, it seems: as a table (by assigning to omega[1][6] etc), and as an ordinary variable.  That causes trouble.  Try, for example: 


> omega6[1] := 7.077500000:
> omega6[2] := 26.10450000:
> omega6[3] := 54.41300000:
> omega6[4] := 88.04050000:
>                      
> eta[1][6] := .5785000000e-1:
> eta[2][6] := .7735000000e-2:
> eta[3][6] := .8760000000e-2:
> eta[4][6] := .3143500000e-1:
>
> r[1][2] := .152-.58e-1*I:
> r[2][2] := .262-.80e-1*I:
> r[3][2] := .235-.10e-1*I: 
> r[4][2] := .426-.755*I:
>
> alpha[1,1] := sum((r[n][2]/(omega6[n]^2 - omega^2 + I * eta[n][6] * omega6[n]^2)),n=1..4);

> map(evalc @ Re, alpha[1,1]);

Do you mean something like this?

> makefig:= proc(mu1, sigma1)
    uses Statistics, plots;
     local N, f, P1, P2, P3;
     N:= RandomVariable(Normal(mu1,sigma1));
     f:= unapply(PDF(N,x),x);
     P1:= plot(f(x),x=1..12):
     P2:= pointplot({[mu1-sigma1,f(mu1-sigma1)],[mu1+sigma1,f(mu1+sigma1)]},symbolsize=15):
     P3:= textplot([mu1-sigma1-.3,f(mu1-sigma1),mu-sigma],align=left),
       textplot([mu1+sigma1+.3,f(mu1+sigma1),mu+sigma],align=right):
     display(P1,P2,P3);
end proc;
> makefig(6.8,1.47);

Do you mean something like this?

> makefig:= proc(mu1, sigma1)
    uses Statistics, plots;
     local N, f, P1, P2, P3;
     N:= RandomVariable(Normal(mu1,sigma1));
     f:= unapply(PDF(N,x),x);
     P1:= plot(f(x),x=1..12):
     P2:= pointplot({[mu1-sigma1,f(mu1-sigma1)],[mu1+sigma1,f(mu1+sigma1)]},symbolsize=15):
     P3:= textplot([mu1-sigma1-.3,f(mu1-sigma1),mu-sigma],align=left),
       textplot([mu1+sigma1+.3,f(mu1+sigma1),mu+sigma],align=right):
     display(P1,P2,P3);
end proc;
> makefig(6.8,1.47);

I did that.  Here's a screen shot.

First 95 96 97 98 99 100 101 Last Page 97 of 187