Items tagged with plot plot Tagged Items Feed

I would like to look at a 3d plot including an condition about the two variables of the plot

For this simple case, I only want to see the plot with the condition that x>0. Is that possible?

plot3d(x*y,[x,0,1],[y,0,1]);

I'd like to plot the following inequalities:

sqrt(x)<=1/sqrt(2)

1/sqrt(2)<sqrt(x)<=1/sqrt(2)

 

Hey!

I have this MATLAB script, but as I work in Maple, I'll need to translate it to Maple. 
I know how to define symbols and functions, but I don't know which Maple commands to use, of if it needs to be done in another way, so the problem is translating from " dZ = [dx; dy; ax; ay; dm];" and down.

Any help would truly be greatly appreciated! Thank you!  



This is the script:

function dZ = meteor_step(~, Z)

  P = 1.2; % initial atmospheric pressure
  H = 1.39E-4; % scale height of atm pressure
  E = 8.11131859E6; % evaporation energy
  D = 1; % drag constant
  G = 9.814; % acceleration due to gravity
  PM = 3.3E3; % density of the meteor
  
  S = 3.986E14; % standard gravitational parameter of Earth (G*M)
  R = 6.3674447E6; % radius of the Earth (meters)

  x = Z(1);  
  y = Z(2);
  dx = Z(3);
  dy = Z(4);
  m = Z(5);
  
  atm = P*exp(-y*H);

  v = sqrt(dx^2+dy^2);

  area = pi * ( (3*m)/(4*PM) )^(2/3);

  dist = sqrt(x^2+y^2);
  Gv = -9.8;

  accel = -(D*atm*area)/m*v;
  ax = accel * dx;
  ay = accel * dy + Gv;
  

  dm = -(atm*v^3*area)/(2*E);
  
  dZ = [dx; dy; ax; ay; dm];
  
end

 

 

 

 

[t, R] = ode45(@meteor_step, [0 250], [0, 100000, 100, -300, 25]);

x = R(:,1);
y = R(:,2);

dx = R(:,3);
dy = R(:,4);

v = (dx.^2+dy.^2).^(1/2);

m = R(:,5);

figure(1);
plot(t, y);
  title('Meteor Kinematics: Height vs Time');
  xlabel('Time elapsed (s)');
  ylabel('Height (m)');

figure(2);
plot(x, y);
  title('Meteor Kinematics: Horizontal vs Vertical Position');
  xlabel('Horizontal (m)');
  ylabel('Vertical (m)');

figure(3);
plot(t, v);
  title('Meteor Kinematics: Speed vs Time');
  xlabel('Time elapsed (s)');
  ylabel('Absolute speed (m/s)');

figure(4);
plot(t, m);
  title('Meteor Kinematics: Mass vs Time');
  xlabel('Time elapsed (s)');
  ylabel('Mass (kg)');

  
figure(5);
plot(t, dy);
  title('Vertical Velocity vs Time');
  xlabel('Time elapsed (s)');
  ylabel('Vertical velocity (m/s)');

temp = abs(y - 52900);
[~, index] = min(temp);
  
t(index)
dx(index)/1000
dy(index)/1000

Hi there,

I would like to know whether there is some way to print non-integer axis numbers for a given plot.

Let's say I have an array for an independent variable such as [0.5 1 1.5 2]. I would like Maple to use these values in the corresponding axis instead of printing the array indices [1, 2, 3, 4].

I would like to know how this is done for a surface plot.

 

Attached is the worksheet where "b" is such a parameter/independent variable: MapleSimulation_test11.mw

 

Thank you,

jon

Where u and v are the displacement components in x and y directions respectively.

Hi,

I'm having trouble of converting my y-axis to decibel.  Here is is my script:

 

restart;
with(plots);
loglogplot(1/(1+f), f = 10^(-4) .. 10^4);

 

Everything is fine except for the y-axis, which is not in dB.

 

Hi everyone, I have been trying to plot the Taylor Polynomial approximation with the following code. However, my maple crushes everytime I run it. I indexed some of the variables to get the plot. The code works fine without the index. What did I do wrong?

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 0;

X := 1; 

f := (x, t) -> 1/(3*x(t)-t-2); 

one := 1/(3*x(t)-t-2);

two := diff(f(x, t), t);

first := diff(x(t), t)

 

for k to n do

y[1] := subs(t = T(k), x(T(k)) = X(k), one);

y[2] := subs(first = y[1], t = T, x(T(k)) = X(k), two);

X[k+1] := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T[k+1] := T+h

end do;

X[n];

data := [seq([T[n], X[n]], n = 0 .. 30)];

p[2] := plot(data, style = point, color = blue);

p[3] := plot(data, style = line, color = blue);
display(p[2],  p[3])


 

The code without Index (which works fine)

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 1;

X := .1547196278;

f := (x, t) -> 1/(3*x(t)-t-2); 

one := x(t)^4*e^t-(1/3)*x(t);

two := diff(f(x, t), t);

first := diff(x(t), t);

for k to n do

y[1] := subs(t = T, x(T) = X, one);

y[2] := subs(first = y[1], t = T, x(T) = X, two);

X := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T := T+h

end do

Hi,I'm using Maple 15. When I plot with the command

Aplot:= Plot2D(Q[2 .. 26, 13], Q[2 .. 26, 14], style = point, color = blue, symbol = solidcircle, symbolsize = 16, font = [Arial, Bold, 13], axes = box, axis = [thickness = 1, tickmarks = [5, subticks = 5]]);

There is the report of problem

Error, (in plot/options2d) unexpected axis suboption: thickness = 1

Thank you for helping me.

 

I have been having problems with using the BodePlot function with units:

 

R1 := 18.2*10^3*Unit('Omega');

R2 := 10^3*Unit('Omega');

C1 := 470*10^(-12)*Unit('F');

C2 := 4.7*10^(-9)*Unit('F');

# wo is in hertz

wo := 1/sqrt(R1*R2*C1*C2);

# Q is unitless

Q := wo*R1*R2*C2/(R1+R2)

 

with(DynamicSystems);

sys := TransferFunction(wo^2/(s^2+wo*s/Q+wo^2));

 

This is the error message I got:

Error, (in Units:-Standard:-+) the units `1` and `Hz` have incompatible dimensions

 

I think the problem is that the BodePlot function doesn't expect 'wo' to have units.  

So I tried to work around the issue by using the loglogplot but it doesn't seem to like 

complex function even when I used abs to find the magnitude (with or without units).

 

 Any workaround is appreciated.

Dear all, I have been trying to use Runge-Kutta method to plot an approximate solution with the following code. However, although I can get the numerical approximation the plot would not show.

h := .1;

x[0] := 0;

y[0] := 1;

xf := 3;

n := floor(xf/h)

f:= (x,y)->1/(3 y-x-2)

x := x[0]

y := y[0]

for i to n do

k1 := f(x, y);

k2 := f(x+(1/2)*h, y+(1/2)*h*k1);

k3 := f(x+(1/2)*h, y+(1/2)*h*k2);

k4 := f(x+h, h*k3+y);

k := (k1+2*k2+2*k3+k4)*(1/6);

y := h*k+y;

x := x+h

end do;

y[n]

data := [seq([x[n], y[n]], n = 0 .. 30)];

p[2] := plot(data, style = point, color = blue);

p[3] := plot(data, style = line, color = blue);
display(seq(p[n], n = 2 .. 3));

How can I plot a vertical line say x = a in Maple 15 worksheet?

Thanks

I have 4 retangular equations:

z0:=sqrt(3)+I
z1:=-1+I*sqrt(3)
z2:=-sqrt(3)-I
z3:=1-I*sqrt(3)

on polar form they apear as:

polar(z0)=(2,Pi/6)
polar(z1)=(2,2*Pi/3)
polar(z2)=(2,-5*Pi/6)
polar(z3)=(2,-Pi/3)

I want those polar expressions plottet in a polarplot as points(x,y), how is that possible ?

 

i want to plot a arc that starting angle and finishing angle are variable

but it didn't show the arc there is my code

Dear All,

I need your help to plot the phase portrait using DEtools[DEplot]  these are the lines of the code. But when I make RUN, there is an error. I need your help to fix the error. Many thinks.

 

r1:=1; r2:=1; q2:=2; q1=0.5;  a1:=1;

Sys1 := {diff(N(t),t) = r1*N*(1-N/q1)-P*N/(1+N), diff(P(t),t) = r2*P*(exp(-a1*P)-q2)+P*N/(1+N)};

DEtools[DEplot](Sys1,[N(t),P(t)],t=-10..10,N=0..2,P=0..2);

 

Many thinks

I Want to plot only the intersection between this Surfaces 

 

z = sqrt(x^2+y^2)

y >= abs(x)

x^2+y^2+z^2 >= 4

x^2+y^2+z^2 <= 9

 

Anyone knows how ?

Thanks!

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