Items tagged with multiple

Feed

I have an two arrays of elements Op1[i,j] with -5 <= i,j <= 5 and Op2[i,j] with 5<=i,j<= 35 . When I use surfdata like

surfdata({0p1,Op2})

it produces a plot with both the range of Op1 and Op2 between 0 and 1 (see Fig1).

I tried surfdata({0p1,Op2},-5..35,-5..35) but this only gave the range of the figure from -5 to 35, -5 to 35 but with both plots scaled so that they cover the whole range(see Fig2).

How do i make surfdata use different ranges on the same plot for both arrays?

Hello,

I am not sure how exactly to word my question, so forgive the mess ahead.

Say I have two points, A and B, and I want to make them variables in Maple so whener I refer to A, it refers to the point A.

Currenty what I do, is I write the line "A:=(x,y,z)" enter and then the same for B, but what I would like to do, is maybe write both the variables in one statement - something like "A,B:=(x,y,z),(x,y,z)", so when I am solving problems with 5-10 different points, I won't be filling up 1-2 pages with statements on variables and their values.

I am assuming this is a possiblity, but I haven't been able to find anything on-the-line that could show me how to...

Example picture - where A and B should have had been in the same statement, so when I find the vector between them it'll still give the correct answer.

Any help is appreciated here :)

With gratitude:
Toby

work.mw

I'm having problems plotting these three functions on the same graph. I can get two of them, but as soon as I try to add the third, it throws a couple errors no matter what I do. It doesn't help that the docs are confusing. The first two functions are approximating diff(y(x),x) = -2xy(x)+1 with the Euler method (step size of 0.05 and 0.1) that I implemented using a for loop. I gather the data into an array and then plot those. That works. But once I try to set y(x) equal to a Taylor approximation, I can plot that graph but the values for the other functions are strangely absent. I've attached my work. What is wrong with my syntax and how can I plot all three functions at once?

I am trying to plot some graphs for a differential equations class. I need to plot two equations (soln1a, soln1b1) in one graph, with the two curves overlayed on each other. I am trying to plot them on a graph named "gr1c". The error I get says "Error, (in plots/multiple) empty plot". Clicking on the error results in a webpage saying that "There is no help page available for this error".

When I plot each equation separately, there are no errors. The graphing command that works for soln1a is 

gr1a:=plot(rhs(soln1a),dom1,color=blue);

 

and the graphing command that works for soln1b1 is

gr1b1:=plot(rhs(soln1b_1),dom1,color=purple);
 

My code is as follows. I would greatly appreciate any help ASAP to remove the error. Thank you!

 

with(plots):with(DEtools):

K:=9;
deG:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*sin(theta(t))= 0;
deL:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*theta(t)= 0;
Iv:=theta(0)=0.75, D(theta)(0)=2.0;
dom1:=t=0..10;
soln1a:=dsolve({eval(deL,mu=0),Iv});

soln1b_1:=dsolve({eval(deL,mu=1),Iv});

gr1c:=multiple(plot[soln1a,soln1b1],dom1,color=[blue,purple]);
 

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]];
  [[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]
data1 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]; 'data1';
                             data1
a*x^3+b*x^2+c*x+d;
                        3      2          
                     a x  + b x  + c x + d
x;
                               x
Equn1 := CurveFitting[LeastSquares]([[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]], x, curve = a*x^3+b*x^2+c*x+d);
plot(Equn1,x= 1000..5000)


 

Least Squares Approximation

 

 

Calculate a least squares approximation using specified data points.

 

 

Theoretical Curves for the Two-Stroke Engines and Four-Stroke Engines Brake Power Vs Brake Efficiency

List of Data Points:

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]

[[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]]

(1)

data1 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]; 'data1'

data1

(2)

Fitting Curve:

a*x^3+b*x^2+c*x+d

a*x^3+b*x^2+c*x+d

(3)

Independent Variable:

x

x

(4)

Least Squares Curve:

Equn1 := CurveFitting[LeastSquares]([[1000, 20], [2000, 25], [3000, 24], [4000, 23], [5000, 24]], x, curve = a*x^3+b*x^2+c*x+d)

plot(Equn1,x= 1000..5000)

 

 

 

 

NULL

Equn1

31/5+(83/4200)*x-(23/3500000)*x^2+(1/1500000000)*x^3

(5)

 

 

Least Squares Fit of Data by a Specified Curve

List of Data Points:

[[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]]

[[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]]

(6)

Fitting Curve:

a*x^2+b*x+c

a*x^2+b*x+c

(7)

Independent Variable:

x

x

(8)

Least Squares Curve:

CurveFitting[LeastSquares]([[3, -1], [5, 3], [6, -7], [7, 5], [9, -2]], x, curve = a*x^2+b*x+c)

-901/210+(213/140)*x-(11/84)*x^2

(9)
 

 

a*x^2+b*x+c

a*x^2+b*x+c

(10)

plot(sin(x), x = 0 .. 4*Pi)

 

``


 

Download LeastSquareApproximation_2nd_and_3rd_Order.mw

The above command plots one curve alright. I want four such curves to go in the same figure using command like

plot(Equn1,Equn2,Equn3,Equn4,view(x=1000..5000)

I am not getting by the above command what I want. Can any one help. A shortcut method is required for me to repeat many times.

Thanks for help.

Ramakrishnav V
 

I'm doing a Maximum/Minimum problem ( Calculus 3).

I need to plot f(x,y) =   x2  + y 2 -2y + 1

over R={x,y): x 2 + y 2         (less than or equal sign) 4}

I m using the follwing commands for ploting the five differnt values of M

with(plots):
SDfd1 := odeplot(dsol[1], [eta, diff(f(eta), eta)], -1 .. 1, color = green, axes = box);
SDfd2 := odeplot(dsol[2], [eta, diff(f(eta), eta)], -1 .. 1, color = red, axes = box);
SDfd3 := odeplot(dsol[3], [eta, diff(f(eta), eta)], -1 .. 1, color = blue, axes = box);
SDfd4 := odeplot(dsol[4], [eta, diff(f(eta), eta)], -1 .. 1, color = black, axes = box);
SDfd5 := odeplot(dsol[5], [eta, diff(f(eta), eta)], -1 .. 1, color = pink, axes = box);
display([SDfd1, SDfd2, SDfd3, SDfd4, SDfd5], labels = ["η", "f ' (η)"],
    labeldirections = [horizontal, vertical], labelfont = [italic, 16], axes = boxed,
    axesfont = [times, 14], thickness = 3);

But i do not want in colors.....i need graph without colors in different styles. how can ? Moreover i need legend which must be in centre of graph or within the box. It must not on left, right ,up or below. can some one help ?

Hello everyone, I was trying to plot graph for some functions but its just plotting one plot. Anyone with useful information please.

Pe.maple

Dear all,

My script has multiple animations, in which the range of the variable is larger then I wish to see. Therefore, I have used the view=[x1..x2,y1..y2] command, which has different values for every plot. Plotted seperately, this gives me exactly what I want. However, if I combine the plots using display(A,B,C) they loose their individual views. Instead, maple chooses the view of plot A, and plots B an C in the range defined by view A. 

Is there a way to combine plots and still maintain individual views, within the largest view?

Kind regards,
Bastiaan Overdorp

Hi,

Is there any way to generate a subplot in Maple2016?

I want to show many plots in one table at once.

I appreciate any idea you may have.

 

I want to draw multiple curves based on a single equation in which a parameter will change giving different curves. I want these curves to be in the same frame. Is there a single line code for the same? 

Already searched and browsed multiple different threads and still cannot find a solution.

Apologizing the noob nature of this question.

 

 

In this code below, Why is the factor command not working?

f := a^2+x^2-2*ax;

a^2+x^2-2*ax

(1)

factor(f);

a^2+x^2-2*ax

(2)

expand((x-a)*(x-a));

a^2-2*a*x+x^2

(3)

``

NULL

NULL


Download factor_polynomial_2_multivariable.mwfactor_polynomial_2_multivariable.mw

 

What is the best way to export/update multiple values from a single procedure? As far as I understand, a procedure does not let you update global values (the inputs), and it returns the value for the last step performed. Let's say for example, I had a procedure like this:

proc(a,b,c)

local x,y;

*series of steps that use a,b, and c to calculate x and y*

end proc

 

How do I get the results for x and y out of the procedure? 

 

Thanks

Dear all,

I have a question: how to compute the roots of exp(z) = -1 with z in C? 

I tried: 

fsolve( exp(z) = -1, z, complex );

But it only gives one root (0.1671148658e-3+4.934802220*10^9*I) which does not even seem to be correct. I would prefere smth like z_n = I*(2*n-1)*pi or at least multiple roots...

By using

solve(exp(x) = -1, x);

it returns I*Pi.

 

MATLAB MuPAD gives the desired result:


solve(exp(x) = -1, x)

(PI*I + 2*PI*k*I, k in Z)

 

 

Thanks!

Hello everyone !

I have a problem when I want to calculate the following multiple integration numerically:

>evalf(Int(exp(sum(x[i],i=1..6)^2),[seq(x[i]=-1..1,i=1..6)]));
  value(%);

It doesn't work. But when I replace sum(x[i],i=1..6)^2 with sum(x[i],i=1..6), it works. Is there any feasible solution to my problem ?

Thank you for reading !

 

1 2 3 Page 1 of 3