MaplePrimes Questions

Here is my command

 

> teksbiasa:=`Kriptografi`;

teksbiasa:=Kriptografi

>len:=length(teksbiasa);

len:=11

>nilaiASCII:=convert(teksbiasa, bytes);

nilaiASCII:=[75,114,105,112,116,111,103,114,97,102,105]

>L:=[seq(i,i=nilaiASCII)]

L:=[75,114,105,112,116,111,103,114,97,102,105]

 

Anyone know how i need to write the command to add the lenght of the text (len) into each of the number in nilaiASCII?

What is want to get is:

[86,125,116,123,127,122,114,125,108,113,116]

Thank you~=]]

[75,114,105,112,116,111,103,114,97,102,105]

For bonus in my one class, we are required to change the code in a program to have it produce another row when running Neville's Method. We need to, after it runs initially, have it ask "Run another time? Y/N" and type 'Y' or 'N' for Yes or No. If No, it ends the program. If yes, we need to have it input another x(i) and f(x(i)) without having to input all the other data points again. Here is what I have so far (this is just the additional part we have to add, not the whole code):

 print(`Do you want another point? Type Y or N.`):
  J := scanf(` %c`)[1]:print(`Entry = `):print(J):
  if J = "Y" or J="y" then
  AGAIN := "Y":
  AGAIN = "Y" or AGAIN = "y":
        OUP := default:
      fprintf(OUP, `NEVILLE'S METHOD\n `):
       fprintf(OUP, `Table for P evaluated at X = %12.8f , follows: \n`, X):
       fprintf(OUP, `Entries are XX(I), Q(I,0), ..., Q(I,I) `):
       fprintf(OUP, `for each I = 0, ..., N where N = %3d\n\n`, N):
       for I1 from 0 to N+1 do
         fprintf(OUP, `%11.8f `, XX[I1]):
         for J from 0 to I1 do
           fprintf(OUP, `%11.8f `, Q[I1,J]):
         od:
         fprintf(OUP, `\n`):
        od:
    if J="Y" or J="y" then
         AGAIN := Y:
             if AGAIN = Y or AGAIN = y then
                 #N=N+1:
                  if N > 0 then
                  OK := TRUE:
                 for I1 from N to N+1 do
                        print(`Input X(i) and F(X(i)) for i = `):print(I1):
                        print(`separated by a space `):
                       XX[I1] := scanf(`%f`)[1]:
                       Q[I1,0] := scanf(`%f`)[1]:print(`Entries are`):print(XX[I1],Q[I1,0]):
                  od:
                else
                  print(`Number must be a positive integer `):
               fi:


            else
                AGAIN := No:     
         fi:
         fi:
    else
        print(`Ok thanks`):
 fi:

Not sure what I am doing wrong and any help is appreciated. Thanks.

One new feature of Maple 2016 is claimed to be

          FunctionAdvisor(plot, .......)

but when I try HeunD or HeunG there is no output -- no error message, nothing.  Is this behaviour what a user should expect of this command?

I would like to scale the last KernelDensityPlot in the attached worksheet to overlay with the Histogram above it.  The result would look like the 3rd plot in the worksheet, except the y-axis ranges would match.

MonteCarloHistogram.mw

montecarloHistogramExample.txt

Regards,

Georgios

I'm trying to solve a recurrence relation by generating terms and looking for a pattern.  I've learned that i can't stop 

Maple's autosimplification process and the best I can do is use Parse from the InertForm package.  The hand drawn picture below is what I'm trying to replicate.  I know I can use rsolve but I'm trying to do the steps I would with pencil and paper.

 

I want to set the determinant of the coefficient matrix equal to zero and then solving for the roots. But I could not achieve it via Maple. Can you help me please? 

You can reach two examples in the following file.  Yeni_Microsoft_Word_Belgesi_(2).docx

 

Besides. how can i compute the following transcental equations via maple 

 

sinh(beta*L)*sin(beta*L)=0

 

cosh(beta*L)*cos(beta*L)-1=0

 

cosh(beta*L)*cos(beta*L)+1=0

 

regards

mehmet

Here is my command..

 

> mylist:=[4,6,2]: for x from 1 to nops (mylist) do convert (mylist[x], binary) end do;

> z:=map(convert, mylist, binary);

[100, 110, 10]

> map2(nprintf,"%08d",z);

[00000100, 00000110, 00000010]

 

how I need to continue the command to get the number of 1s in each of the binary number? 

Thank you~=]]

`00000100`, `00000110`, `00000010`

Sorry for disturbing you again. I am haunted by a problem about Taylor expansion in Maple.

For example, when the angle alpha is small, thus we could use taylor(sin(x),x=0,1) to get a approximated function of sin(x) with different order of precision.

But, if the sin(x) meets diff(x(t),t), (x is a time-dependant variable), could we also apply the Tayolr expansion in Maple to obtain a approximation?

For example, the function: sin(x(t))*diff(x(t),t), x(t) is given with a small value, but diff(x(t),t) could not be neglected, because even x(t) is with a small value , diff(x(t),t) could be great. We could conduct the Talyor expansion with hands, and sin(x(t))*diff(x(t),t) becomes x(t)*diff(x(t),t). But I wonder if we could use Maple to realize this procedure. And if the Maple could make it, I would like to know if the Maple could handle the multi-variable Taylor expansion accompanied with the time derivative. For example, the x(t) and y(t) are considered as small value variables, could we simplified the following function sin(x(t))*cos(y(t))*diff(x(t),t)*diff(y(t),t).

Thank you very much in advance for taking a look. 

Hi. Is there a maple function which can interpolate values from a simple table:

given (x,y) compute z value

eg z(0.5,0.5)=1.5

x:=[0,1,2];y:=[0,1,2]

array:=[0,2,4;1,3,5;2,4,6] #probably the wrong input, but you get the idea

ArrayInterpolation?

there is a method in vba:

http://www.tushar-mehta.com/excel/newsgroups/interpolation/#Two_dimensional_interpolation_

 

I noticed exactly the same expression in Help file of Maple2015.2 and Online Help (http://www.maplesoft.com/support/help/Maple/view.aspx?path=DifferentialGeometry/DGsetup). 

Currently Online Help of DGsetup has been reverted to 'normal expression' and we cannot see the expression anymore by Online Help.  Help of Maple2015.2 is still kept unchanged or possibly awaiting update, though such expression has never appeared with Maple2015.2 runs.

Maple18 had a minor update of 18.02. Maple18.02 in hand does not produce such expression. Had you tried it by Maple18?    I am rather interested in the intension of developer to modify the original familiar expression.

Best regards, Stev Eland

Is there a way to apply op to an expression and get back every possible operand and the corresponding list value?  I sometimes don't know how far to go with a list of inputs to get what I want.

Dear all.

I am a french ingineering student and I have some problems trying to modelize the ascension of a space balloon (closed balloon full of Helium) from 0 to 11000m in ISA conditions.

I think that my initialization is OK but I'm unfortunately not able to find how to solve my non linear equation. My equation is: ` ρ`[air]*V[Ballon]*g = mg+(1/2)*rho[air]*C[x]*V[z]^2

I copy my work below:

###############################################################################

#Atmospheric parameters, initialization
#temperature (K)

Ta := 15-6.5*((1/1000)*z(t))+273.15;

#pressure (Pascal)

 

 Pa := 1013*10^2*(1-3.32*10^(-5)*z(t))^(7/2);

#moleculai mass of air

 

M := 29;

#thermodynamic constant

R := 8.314;

#volumic mass of air following the altitude

 

J := M*Pa/(R*Ta);

#Laplace coefficient, initial volume of the balloon, ground pressure:

 

ga := 1.6665;

V0 := 4.43;

P0 := 1.013*10^2;

#Balloon volume following the altitude (Laplace formula)

 

Vball1 := (P0/Pa)^(1/ga)*V0;

#Disc surface for the drag force

S1 := 3.14^(1/3)*(3/4)^(2/3)*Vball1^(2/3);

with(DEtools);

Cx := .44; #(turbulent flow)

g := 9.81;

mball := 3; #(balloon mass)

ode1 := J*Vball1*g-mball*g-(1/2)*J*S1*Cx*(diff(z(t), t))^2 = 0;

ics := (D(z))(0) = 0, z(0) = 0:

dsolve(????????);

###############################################################################

The problem is that because of its non linear aspect, i don't know what kind of method I have to use to find the solution with my initial conditions. 

Thank you in advance for your answer, 

ANTHONY 

hi all,

 

Im trying to plot an exponential function which has 2 variables times a constant coefficient. like A*exp(-f(x,a))

When A gets larger, maples fials to plot a smooth curve! how can I solve this problem? 

please see the attached file. If rho grows to 0.9, in the first line, you can see when it gets bigger, the cosnstant coefficient of Eq. (7) gets larger rapidly and the plot goes crazy! 

sz2012_4m.mw

Sorry for disturbing you. I am wondering if there is an easier approach in Maple that could convert a system of second order differential equations into matrix form. Of course, we could do it by hand easily if the degrees of freedom is small. I would like to know if we could use Maple to do so. 

Here is an example with 6 degrees of freedom: the variables are u, v, w, alpha, beta and gamma. And, this is a uncoupled system.

Vector(6, {(1) = 2*R^2*(diff(w(t), t))*Pi*Omega*h*rho+R^2*(diff(u(t), t, t))*Pi*h*rho-R^2*u(t)*Pi*Omega^2*h*rho = 0, (2) = R^2*(diff(v(t), t, t))*Pi*h*rho = 0, (3) = -2*R^2*(diff(u(t), t))*Pi*Omega*h*rho+R^2*(diff(w(t), t, t))*Pi*h*rho-R^2*w(t)*Pi*Omega^2*h*rho = 0, (4) = (1/4)*R^4*Pi*(diff(alpha(t), t, t))*h*rho+(1/12)*R^2*Pi*(diff(alpha(t), t, t))*h^3*rho+(1/6)*R^2*Pi*(diff(gamma(t), t))*Omega*h^3*rho-(1/12)*R^2*Pi*alpha(t)*Omega^2*h^3*rho = 0, (5) = (1/2)*R^4*Pi*(diff(beta(t), t, t))*h*rho-(1/2)*R^4*Pi*beta(t)*Omega^2*h*rho = 0, (6) = (1/4)*R^4*Pi*(diff(gamma(t), t, t))*h*rho+(1/12)*R^2*Pi*(diff(gamma(t), t, t))*h^3*rho-(1/6)*R^2*Pi*(diff(alpha(t), t))*Omega*h^3*rho-(1/12)*R^2*Pi*gamma(t)*Omega^2*h^3*rho = 0});

The objective is to reform it into matrix form : M*diff(X(t), t, t)+C*diff(X(t), t)+K*X(t)=F.

Thank you in advance for taking a look. 

Hi, anyone know the command to convert a digit to 8 bits binary number ?

Thanks for help..

First 1081 1082 1083 1084 1085 1086 1087 Last Page 1083 of 2364