Items tagged with output output Tagged Items Feed

I have a plot of a sinusoidal function(cos_phi) which changes with incrementing values of variable k. When this function goes above 1 or below -1 I would like to have the range of k for which it occurs outputed somehow. Would anybody know how to do this?

Dear all;

Please give me few minutes to correct the output of this procedure.Many thinks. 
We will solve the waves equations: diff(f(x,y,t),t$2)=c^2*( diff(f(x,y,t),x$2) +diff(f(x,y,t),y$2));  where (x,y,t) in [0,1]*[0,1]*[0,T] using finite difference.  With Initial boundary conditions: [u(0,y,t)=u(1,y,t)=0],   [u(x,0,t)=u(x,1,t)=0],  [u(x,y,0)=f(x,y),   diff(u(x,y,0),t)=g(x,y)]... The code is done and perfect but....The output of this procedure is Nothing. How can I plot the solution...

local Ft, Fx,Fy,x,y, c1,c2,c,j,k,i,u;
Ft := floor(Tf/dt)+1;
Fx := floor(1/dx)+1;
Fy := floor(1/dy)+1;
c1 := (c*dt/dx)^2;
c2 := (c*dt/dy)^2;
#Initial position
for j from  1 to Fx do  
   for k from 1 to Fy do
  u[j,k,1] := f(-dx + j*dx, -dy + k*dy) -dt*g(-dx+j*dx, -dy + k*dy);
   u[j,k,2] := f(-dx + j*dx, -dy +k*dy);
end do;
end do;

# Boundary values j=1
for i from  1 to Ft +1 do
      for k from 1 to Fy do
         u[1,k,i] := 0;
      end do;
      for k from 1 to Fy do
         u[Fx,k,i] := 0;
      end do;

     for j from 1 to Fx do
         u[j,1,i] := 0;
      end do;
   for j from 1 to Fx do
         u[j,Fy,i] := 0;
      end do;
end do;

for i from 3 to Ft + 1 do
  for j from 2 to Fx-1 do
    for k from 2 to Fy-1 do
u[j, k, i] := 2*u[j,k,i-1] - u[j,k,i-2] + c1*(u[j+1,k,i-1]-2*u[j,k,i-1]+u[j-1,k,i-1]) + c2*(u[j,k+1,i-1] - 2*u[j, k, i-1] + u[j,k-1, i-1]);
end do;
end do;
end do;
return Matrix([seq([seq([seq(u[i,j,k],i=1..Fx)],j=1..Fy)],k=1..Ft)]):
end proc:

## Try the test
f:=(x, y) -> x (x - 1) y (y - 1)
g:=(x, y) -> 0;

Hi, i'm wondering if theres anything i can do printf and print and have the outputs on the same line. I want the string wihtout any quotations so i think i can only do printf to get this, but then i'm putting an entry out of an array after this. This is a small example out of my code, i would like the output to be all on one line:

The synchronising vector is (S[j-1]) The synchronising word is (X[j-1]) The length of the synchronising word is ...


if (sync=true) then 
printf("The Synchronising vector is"); print(S[j-1]);
printf("The sychronising word is");
printf("The length of the synchronising word is");
else printf("There is no synchronising word"); 
end if;

 At the moment its outputing each print on a new line.

Any help would be much appreciated, thanks.


Dear all


Please, I need you help, to make a simple procedure with two output.  I try this simple code :

test:= proc(a,b)

local variable .....;

for i from 1 to 10 do


end do

retur  fff;

return ggg;

end proc

Then I do  : test(a,b) but I get only ggg and not fff


Any help please




I have some data:

Matrix(10, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = .5, (2, 2) = 3.25, (3, 1) = 1.0, (3, 2) = 5.82, (4, 1) = 1.5, (4, 2) = 7.50, (5, 1) = 2.0, (5, 2) = 8.79, (6, 1) = 2.5, (6, 2) = 9.83, (7, 1) = 3.0, (7, 2) = 10.66, (8, 1) = 3.5, (8, 2) = 11.35, (9, 1) = 4.0, (9, 2) = 11.94, (10, 1) = 4.5, (10, 2) = 12.46})


I want Maple to make a trendline fitting a Logarithmic function. I can make it output some function with this:

LeastSquares(`<,>`(.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs:



But please notice, the dataset in the function does not have the first 0 and 0. If i do that:

LeastSquares(`<,>`(0, .5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(0, 3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs: 

Error, (in Matrix) numeric exception: division by zero


Besides that, i need the R-squard value for determinating how well it fits.


If i do the same thing i Excel the data set will give a formular: 5.5464ln(x)-0.2175 with a R-sward value of 0.9985.


How can i do this i maple?


Thanks in Advance!



Emil Kristensen

Hallo guys,

I am newbie in Mapple, i could not solve the problem yet, here is my little function. I want to estimate beta with the Maximum Likelihood Estimation with Weibull: 

> MaximumLikelihoodEstimate(Weibull(beta, eta), F1); F1 := Vector([1500, 1750, 2250, 4000, 4300, 5000, 7000]);
print(`output redirected...`); # input placeholder
[beta = HFloat(HFloat(undefined)), eta = HFloat(HFloat(undefined))



May someone help me why i just get HFloat(undefined)  ?


Kind regards

Is it possible to display each element of a sequence on a new line?

The default behaviour, obviously, is to display each element on the same line separated by commas, and wrapping to a new line as required by screen space. This is somewhat unsightly when the elements of the sequence contain long equations or expressions, and impacts readability because the commas don't stand out as effective separators between elements.

For example:

B := b=2;

C := c=3;

A := B,C;


b=2, c=3


Is there a way to display each element on a new line?

For example:





Is there another data type or a simple expression that could achieve this effect?

Is there a way of increasing the spacing between the maple input and output?



this question has been asked several times here already accoruding to the search function, but I didn't find an actual answer to it.

My Maple 15 gives outlarge numbers without scientific notation, so even 10^20 would be displayed as 1000....000  (20 zeroes). It seems like this is not the standard, so at one point I might have changed the way Maple displays the output, and cannot remember anymore how.

How can I tell Maple to display the output in scientiffic notation, and how can I set up the threshold of powers of ten, when this is done. (so that e.g. 100 still gets disaplyed as 100, and not as 1*10^2, but anything above gets displayed in scientific notation).

I know that I can right click on the output to change it's display form. But I want to change this generally, so I dont have to do this for any single numerical output I get.

I use Maple 15, running in Mac OS.

Thanks for help!

I recently installed Maple 17 from my university and greek letters do not work. For instance if I type alpha or any other greek letter, Maple just outputs a capital A in a box. I still have Maple 15 installed and it works on there and all the preferences seem the same.



I have the following six equations that I need to solve:

eq1 := A^5*f6+A^4*f5+A^3*f4+A^2*f3+A*f2+f1 = ln(V1);
print(??); # input placeholder
eq2 := B^5*f6+B^4*f5+B^3*f4+B^2*f3+B*f2+f1 = ln(V2);

eq3 := 5*A^4*f6+4*A^3*f5+3*A^2*f4+2*A*f3+f2 = F1/V1;
eq4 := 5*B^4*f6+4*B^3*f5+3*B^2*f4+2*B*f3+f2 = F2/V2;
eq5 := 20*A^3*f6+12*A^2*f5+6*A*f4+2*f3 = G1/V1-[F1/V1]^2;
eq6 := 20*B^3*f6+12*B^2*f5+6*B*f4+2*f3 = G2/V2-[F2/V2]^2;

 where V1, V2, F1 & F2 have previously been found/defined in the worksheet (document).

When I use the solve command, more often than not I get the expression for the numerical calculation for each variable f1-f6, rather than an actual value:

solutionset := solve({eq1, eq2, eq3, eq4, eq5, eq6}, {f1, f2, f3, f4, f5, f6})

{f1 = 0.4096495220755576e-2*[-1.328181534188746]^2-0.3072371415566682e-1*[-9.408269235937702]^2+12.64287210303000, f2 = .3686845698680018*[-9.408269235937702]^2-49.98313436120349-0.6690942193900774e-1*[-1.328181534188746]^2, f3 = -1.423532089212563*[-9.408269235937702]^2+150.6490386090756+.3909877105143377*[-1.328181534188746]^2, f4 = -.9490213928083751*[-1.328181534188746]^2+1.954938552571689*[-9.408269235937702]^2-190.3706247009334, f5 = .8192990441511152*[-1.328181534188746]^2-1.115157032316796*[-9.408269235937702]^2+103.8844069311055, f6 = .2275830678197542*[-9.408269235937702]^2-20.57204700597870-.2275830678197542*[-1.328181534188746]^2}


Why is Maple not giving me the actual value for the variables, and how do I get it to do so, everytime? [In fact it did output the actual values once – but I have no idea what I did differently: it seems to be very random….]

i.e. how do I output the following:

solutionset := {f1 = 9.930572749191651, f2 = -17.46685689954139, f3 = 25.33406943774393, f4 = -19.00233912206421, f5 = 6.620988906086421, f6 = -.8288827301180226}



is there any way that i run my maplet output in  systems that havnt any maple install on them?

(i wanna run maple program without maple)




Fairly new to Maple and having trouble with the result displayed when using exponential functions. 

So I have the following function h(r), in which f1 - f5 are unknown constants that are to be calculated. [I am attempting to set up the equations needed to do so]:

h := r → exp(f1 + f2r + f3r+ f4r3 + f5r+ f6r5)

Firstly, I need to evaluate h(r) at the point A. But, on entering the evaluate command, the general expression for h is re-produced:

A := 0.2



Further, I need to take the natural logarithm of h(A), which produces:




How do I get Maple to output the actual result of the substitution of r=A and the logarithm?

i.e. how do I get maple to display:

f1 + 0.2f2 + 0.04f3 + 0.008f4 + 0.0016f5 + 0.00032f6


Apologies if this is a very basic question. 



       I have a huge sparse matrix (1.5e6 x 1.5e6) of both symbolic or non-symbolic form. When I export matrix using ExportMatrix command, it is not writing the matrix in order of rows and columns. To further explain the problem,

          Let A be that huge sparse matrix. I am using


We expect the output to be,

 1 1 0.1

 1 10 0.65




But it is writing the output as


100 1 0.25

100 25 0.65

Hence it is not writing in order. What is the way we can force it to write in order? I do understand using for loop will consume more time.

I have a list contains the triagles with in each triangle has mesure of the angle AOB equal to 45 degrees. Now I want to select four points in list so that they lie on the graph of the funtion y = (ax + b)/(cx + d), where c <> 0. This is the code which I make the list.

> restart:




for x1 from -5 to N do

1 2 3 4 5 6 7 Page 1 of 7