MaplePrimes Questions

Dear Maple users,

 

i have a set of 2 Lines: L1 (determined by the intersection of plane x + y -1=0 and plane x - z - 1=0), 

L2 ( intersection of plane x + y-7=0 and plane x-y+1 = 0 ).

which functions or commands of maple should I use "visualize" those 2 lines L1 and L2?

 

thanks for your help,

 

JJ

I want to compute binomial coefficients mod 2 in Maple.  My numbers are getting big and the standard function binomial(n, k) is very slow. Is there a maple procedure or function which will be fast for computing this mod 2?  (I know how to do this theoretically, but not in maple.) Thank you for your help.

Hello,

I am new to maple and coding so please bare the amateur coding.

 

I am trying to plot the following function:

 

When tgk < tb then I want it it to point a cross, where tgk and tb are functions that both have x and y values in them.

This is what I have:

My domain is x=-18..18 and range is y=0..12

I want x and y values to be integer values in degrees. And I want all possible combinations to be plotted (e.g (1,1) (1,2) (1.3) etc.) I do not know how to do any of this, but I need it for something I am modeling, and this software was recommended to me.

I am new to Maple and I have never really learned how to code. Any help would be really appreciated!

Thanks

Hi guys,

I am trying to fit some constants to an equation in maple but am very new to the software and am struggling somewhat to input he correct commands.

I have the following equation;

x=a(y^b)(z^c)

And I have data points for x, y and z

I need to calculate the best fit value for a, b and c based on this data.

These constants are material properties for calculating creep in a structures and the data is somewhat dirty, therefore my hand calcs lead to an unsolvable results so best fit values are my only hope!

Any suggestions or a nudge in the right direction would be wonderful!

Thanks 

Steve

Dear all;

 

Thanks ifor looking and help me in my work. Your remarks are welcome.Description:
 This routine uses the midpoint method to approximate the solution of
     the differential equation $y'=f(x,y)$ with the initial condition $y = y[0]$
     at $x = a$ and recursion starting value $y = y[1]$ at $x = a+h$.  The values
     are returned in $y[n]$, the value of $y$ evaluated at $x = a + nh$.       
                                                                          
Arguments:     
\begin{itemize}
\item  $f$  the integrand, a function of a two variables
                
                \item $y[]$ On input $y[0]$ is the initial value of $y$ at $x = a$, and $y[1]$
                is the value of $y$ at $x = a + h$,
                \item on output for $i \geqslant 2$
             $$ y[i] = y[i-2] + 2h f(x[i],y[i]); \quad \quad x[i] = a + i h.$$
             \end{itemize}

 
CODE USING MAPLE

 Midpoint-Method=proc(f,a,b, N)

h:=(b-a)/N;
x[0]:=a;
y[0]:=1:

 for n from 2 to N do
    x[n] := a+n*h;
    y[n+1] = y[n-1] +  2h f( x[n], y[n] );
od:
// Generate the sequence of approximations for the Improved Euler method
data_midpoint := [seq([x[n],y[n]],n=0..N)]:
//write the function;
F:=(t,y)-> value of function ;

//Generate plot which is not displayed but instead stored under the name out_fig for example
out_fig := plot(data_midpoint,style=point,color=blue)

 

Your remarks.

Thanks

 

 

 

m:=proc(n::list)
local N, S, i:
N:=nops(n);
S:={};
for i from 1 to N do
if n[i]=1 then do
S:=S union {i}; break; od; fi; od;
for i from 1 to N do
if n[i]=0 then do
S:=S union {}; break; od; fi; od;
end proc;

 

the procedure works if the last member of a list is 0, for example 

m(1,0,1,0); 

returns {1,3}

 

but if it ends in 1, nothing gets returned, example: m(1,0,1);

I can also get it to work the other way around, where it'll return the set if the list ends in 1 but not zero. I need it to work for both.

I want to graph y=x^2, x>=0. but i want the axis to go from -2..2 so that you can see the restriction.  How do I go about this?

 

Sorry for the last post:

 

StandardDeviation not StandardVariation

with(Statistics);

L := [3, 2, 2];

W := [7, 5, 8];

StandardDeviation(L, weights=W);

The results by Maple 17 is 0.589345606817264


But the value of the standard deviation value must be : 0.489360484929593

 

What is the problem?

 

Thanks in advance!

I am trying to solve these equations:

eq1:=cot(theta[n])=(omega[a]^2 - omega[n]^2)/omega[n];

eq2:=cot(theta[n]+ omega[n])=-(omega[b]^2 - omega[n]^2)/omega[n];

for some values of omega[a] and omega[b]. I will in the end create two 3d plots for omega[n] and theta[n] as a funciton of ometga[a] and omega[b]

So for example for some particular values have:

eqs:=subs(omega[a]=0.2, omega[b]=1, [eq1, eq2]);

Then solving,

solve(eqs, [omega[n],theta[n]]);

gives:

I'm however only interested in solutions where omega[n]>=0, but doing this:

solve(eqs, [omega[n],theta[n]], UseAssumptions) assuming omega[n]>=0.0;

returns an empty list. Adding the condition omega[n]>=0.0 to the list of equations also does not work.

Is this a bug or am I missing something? Note, I realize that i can manually go through the entries myself and pick the right solutions, I am just asking how to force maple to do this automagically.

thanks

 

Here is the full code:

restart:

eq1:=cot(theta[n])=(omega[a]^2 - omega[n]^2)/omega[n];

eq2:=cot(theta[n]+ omega[n])=-(omega[b]^2 - omega[n]^2)/omega[n];

eqs:=subs(omega[a]=0.2, omega[b]=1, [eq1, eq2]);

solve(eqs, [omega[n],theta[n]]);

solve(eqs, [omega[n],theta[n]], UseAssumptions) assuming omega[n]>=0.0;

Let a(1)=916 , a(2)=935 , a(3)=713  , a(4)=845  , a(5)=274  , a(6)=914 ,a(7)=255 . Find formula a(n)= ? ,n=1,2,3,....

I cannot copy and paste into this site using the Google Chromium brower (v 32). Has anyone had this problem and know of a work-around? What I'd really like to do is use Edit-with-Emacs (a chromium extension). It works for other sites.  I can open it from this site, but nothing I enter gets transferred. I'm guessing this is related to the inability to cut/paste.

Hello everyone,

 

I'm having some trouble overlaying a set of complex plots. I follow the usual procedure 'display(p0,p1)' I only get p1...

 

If i try with plots the display command works fine, here's the piece of code I'm trying to get working (r is defined elswhere as function of x and phi):

i := 0;

p := Array(0 .. 10);

for x from 0 by .2 to 2

do p[i] := complexplot(r, phi = -(1/2)*Pi .. (1/2)*Pi);

i := i+1

end do;

display(p[1], p[10]);

 

Any hints?

 

Cheers,

Felipe

I am a new user of Maple. Could anyone help me to know how to call a Maple function/procedure from a Matlab program with a simple example? And conversely, how to call a Matlab function from Maple.

I have 20 datapoints in two groups. I may name them as f[1],...,f[10];g[1],...,g[10]. f[1]:=[1.2,3.5] etc

I would like to plot these 20 points

(1) in one plot

(2) f[1]~f[10] in one color; g[1]~g[10] in another color.

 

I checked http://www.maplesoft.com/support/help/Maple/view.aspx?path=plots%2fpointplot

and did not get the point :(

 

Do you any suggestion what can I do to realize the aims (1) and (2)?

 

Thank you very much in advance!

Hi, 

 

  I tried to use generated random as following

*** 

for j from 1 to 5 do
    c:=rand(0..1):
    d:=c();
    print(`random number`,c(),d);

    if c()=1 then

       print(`Y`)
    else
     print(`N`);
    end if;
  end do:

***

 

  The output is

 

****

                      random number, 1, 0

                               Y

                      random number, 1, 1

                               Y

                      random number, 1, 1

                               N

                      random number, 1, 1

                               N

                      random number, 0, 0

                               N

****

  Why the output numbers in one line are different? And Using "if" sentence seems do not correspond to the printed "c()" value..

 

Thank you very much in advance!

 

First 1459 1460 1461 1462 1463 1464 1465 Last Page 1461 of 2426