MaplePrimes Questions

I am trying some data analysis on an Excel worksheet using Maple. I have the following procedure but I don't know how to make it work for a specific subset of cells (this is a psychological studiy, so I want to have all my scores for each subject, located on the rows, and variable, located on a subset of columns). Example: I want to get an array of all the average scores in a rectangle of cells which goes horizontallyfrom A to AB, and vertically from row 1 to 15. Hope you can help me out! Cheers!

MediaRighe := proc (M) local i, j, r, c, S, N; r := LinearAlgebra:-RowDimension(M); c := LinearAlgebra:-ColumnDimension(M); S := Array(1 .. r); for i to r do S[i] := 0; N := 0; for j to c do if M(i, j) <> "-" then S[j] := S[j]+M(i, j); N := N+1 end if end do; S[i] := S[i]/N end do; return S end proc

I also have this for the columns (same thing, basically):

MediaColonne := proc (M) local i, j, r, c, S, N; r := LinearAlgebra:-RowDimension(M); c := LinearAlgebra:-ColumnDimension(M); S := Array(1 .. c); for j to c do S[j] := 0; N := 0; for i to r do if M(i, j) <> "-" then S[j] := S[j]+M(i, j); N := N+1 end if end do; S[j] := S[j]/N end do; return S end proc

Thanks everybody!

I am interested in using both in the same graph. And I am aware that i can drag from one to the other manually, but I am interesseted in doing it in a command. 

So i have 3 vectors a, b and an error. 

I can define ExponentialFit function based on a and b, and the plotting both observations, errors and the fitted function.

 

Per Kirkegaard

 

I know how to find a solution that satisfies the constraints, but in my case I need to find a solution which does not satisfy the constraints. Is there anyway that lp_solve can do that for me?

Lets say I have the following in LP format:

max: a;
1 < a;
a < 10;

Then, I can use lp_solve to give me a solution satisfied by the constraints, but is it also possible to find a solution not satisfied by the constraints using lp_solve?

Is there a Mangoldt function in maple? How do you invoke it?

I plot a curve with "plot" command, how to export the figure to .emf format file?

Please advise as to the proper coding entries needed in the triple integration palette  to transform from the Cartesian placeholders x;y;z to spherical coordinates rho; theta; phi so that the triple integration palette can be used in spherical coordinmates. Dr. Lopez alreadyb has a standalone template which does this but I would like to set a palette option for spherical  calculations.

 

Thanx

This is one of these silly ones that crop up every-so-often (and yes, beta, gamma are just the relativistic v/c and energy):

gamma=1/sqrt(1-beta^2);
solve(%,beta);

comes up with ±I*sqrt(-gamma^2+1)/gamma.

While this is not wrong it is nothing I want to throw at any student trying hard enough as it is to keep his/her head above water. What I want is beta=sqrt(1-1/gamma^2) and I am having a devil of a time getting Maple to do this. even doing it "by hand" the I comes in the moment I take the sqrt. "assuming" does not help (and when I try ...assuming beta::positive, gamma > 1 I get an error claiming these to be inconsistent).

What gives?

Mac Dude

Dear All,

I have a simple question, Thanks of your remarks

I would like to find the slope of a line:

 

I Want to find the slope of this line. How????

Hi. 

 

I have this expresssion:

 

int(sqrt(1+(diff(f(x), x))^2), x = 0 .. 17)

I know the result is:

30.75115129-1.376953493*10^(-8)*I

 

But it takes 13 minutes for maple to get to that solution, and i do not need the part with the I, complex number.

 

Is there any way to make maple evaluate this expression without computeing the complex number? A setting in generel, or some function to put the expression into?

 

Thanks in advance!

 

Emil Kristensen

I would like to tell Maple to evaluate all numbers in an expression using floating point numbers (of a desired precision). Short example:

evalf[30](x^(1/12));

prints

x^(1/12)

while I want it to print 

x^(0.0833333333333333333333333333333)

Note that the real expression may be arbitrarily complicated. I know that it is possible easily because I have already seen this somewhere, but I don't remember it. 

Explorer_Assistan.mw

I tried the video example of the Explorer Assistant, and get jumbled output.  See the *.mw file.

Ratch

 

Hi,

I have a 4-D function that I have found an analytic expression for in Maple, but I want to generate a numerical 4-D array, which I can export for use in Matlab. However, I don't think I'm using a very good solution, because it is extremely slow (several minutes for even 10x10x10x10 elements). My code is

NumRange:=10:
NumElements:=10:
dx:=2*NumRange/(NumElements-1):
A:=Array(1..NumElements,1..NumElements,1..NumElements,1..NumElements,[seq([seq([seq([seq(evalf(rho(ws1,ws2,ws1p,ws2p)),ws2p=-NumRange..NumRange,dx)],ws1p=-NumRange..NumRange,dx)],ws2=-NumRange..NumRange,dx)] , ws1=-NumRange..NumRange,dx)],datatype=float);

Rho is an exponential with 10 terms in the exponents.

I also tried using four for-loops but that was even slower!

Thanks for any input

How can I write a general procedure which will take an integer n and create n nested loops:

add(...(add(f(x_1,...,x_n),i_1=0..k_1),...),i_n=0..k_n);

Thank you in advance.

I wanted to define a 4th order tensor in the following way,

    restart;
    with(Physics);
    Setup(mathematicalnotation = true);
    delta := KroneckerDelta;
    L[i, j, k, l] := lambda*delta[i, j]*delta[k, l]+mu*(delta[i, k]*delta[j, l]+delta[i, l]*delta[j, k]);

but when I type L[1, 1, 1, 1] it doesn't replace i, j, j and l by 1. i
do i need to define it in a different way?

Is it possible to find all the solutions of the equation

abs(tan(x)*tan(2*x)*tan(3*x))+abs(tan(x)+tan(2*x)) = tan(3*x)

which belong to the interval 0..Pi with Maple?

 

 

First 1453 1454 1455 1456 1457 1458 1459 Last Page 1455 of 2426