Items tagged with float float Tagged Items Feed

Hi there

I have have a 18*18 matrix which almost each of its element are in symbolic form. Now I need to have all of its eigenvectors. Unfortunately when I use the "Eigenvalues()" function in maple i got nothing. In fact I got the error which comes below.

Error, (in content/polynom) general case of floats not handled

I need to know if there's a solution to eliminate the error? If not, what can I do to determine the eigenvectors and eigenvalues in symbolic form?

I'll be appreciated your help

Hi,

I need to solve systems of numerical equations. I encountered a problem, where one of the parameters (tau[p3]) become FREE, see Maple worksheet attached.

That was clearly not expected.

I spent about 40 mintues to inspect what the problem is, eventually, I find that fsolve works perfectly.

Though fsolve would be the "first" choice for solving floating point problems. I really dont see why the simple "solve" syntax can not work. It is acting strange. And why is *tau[p3]*  FREE, not the others?

 

Could this be a bug? Or maybe is just WRONG to use solve?

 

Casper

solve-fsolve.mw

 

 

Hello Hello everybody 
   I have to solve the following differential equation numerically 


``

 

restart:with(plots):

mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :

eq1:=(mp+mb)*diff(x(t),t$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))-F*sin(omega*t)=0;

1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0

(1)

eq2:=(mp+mb)*diff(z(t),t$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)-F*sin(omega*t)=0;

1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0

(2)

eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+[Ip+mp*l^2+mp*d*l*cos(alpha(t))]*diff(alpha(t),t$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;

587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0

(3)

eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+(Ip+mp*l^2)*diff(alpha(t),t$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t$1)^2*sin(alpha(t))=0;

540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0

(4)

CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0

(5)

solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

 

 

I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

Help pleaase!

thank you !!!

Download systéme_complet.mw

 

I wrote a procedure which rounds floats to a specified precision. I would like to apply it to a Matrix/List/Array/Vector that contains non-numeric cells as well as floats. I'm stuck at the type-checking stage.


# Round0 works on floats and lists and Matrices of floats:
restart;
Round0 := proc(x,n::integer:=1)
   parse~(sprintf~(cat("%.",n,"f"),x));
end proc:

Round0(1.23456789);
1.2

Round0([1.23456789,9.87654321],2);
[1.23, 9.88]

Hi, was wondering if any of you could help me, when I try and find the real part of a function to plot, I get a float(undefined) error, however by just using evalf if gives gives me the real and comlex parts.

zetaroots.mw

The function i want to find realy parts for is f(x).

 

Thanks,

Matt

Dear Readers,

Given an expression for e.g. x^n+ y^3.5, how to extract the symbolic/floating point exponent, I tried with degree method but it fails whenvever there is symbolic or floating point exponent. Is there any alternative ?

 

Thanks,

 

Regards, Satya

Hello every one,

I am gettting this error "unable to store HFloat", while solving a system of ODES numerically.

restart:

eq1:=n*(-diff(f(eta),eta$2))^(n-1)*diff(f(eta),eta$3)+(2*n/(n+1))*f(eta)*diff(f(eta),eta$2)

-diff(f(eta),eta$1)^2-M*diff(f(eta),eta$1)+M*epsilon+epsilon^2+lambda*f1(eta)=0;

eq2:=diff(f1(eta),eta$2)+P*(2*n/(n+1))*(f(eta)*diff(f1(eta),eta$1))=0;

bc:=f(0)=0,D(f)(0)=1,D(f1)(0)=1,D(f)(N)=epsilon,f1(N)=0;

Matlab to Maple...

November 03 2012 AliKhan 10

Dear All

I trying to solve the following in MAPLE, the code works fine in MATLAB but I am not sure why it doesn't give me values in MAPLE

n:=3: alpha_p:=1: p:=2: mu0:=4*Pi*1e-7: Br:=1.12:

A1:=unapply(sin((n*p+1)*alpha_p*Pi/(2*p))/((n*p+1)*alpha_p*Pi/(2*p)),n):

A2:=unapply(sin((n*p-1)*alpha_p*Pi/(2*p))/((n*p-1)*alpha_p*Pi/(2*p)),n):

M1:=unapply((Br/mu0)*alpha_p*(A1(n)+A2(n)),n):

M2:=unapply((Br/mu0)*alpha_p*(A1(n)-A2(n)),n):

I have been using random numbers in other applications than Maple. Usually there is a function, which will give a pseudo random real number between 0 and 1. When I looked for it in Maple I got quite confused, because there are a lot of different options here - obviously because Maple can deliver random numbers/objects in many ways, even following a certain distrubution. I found out it doesn't work by just using rand(), since it is always starting with the same value. Then I found the command randomize(...

consider:

assume(k[f1]>0,k[f2]>0,k[f2]>k[f1],h_bar>0,m>0);
 
h_bar:=1.0545e-34;m:=0.10938e-31;n[0]=1e28;


> eq1:=n=(k[f1]^3+k[f2]^3)/6/Pi^2;

> eq2:=e*V=h_bar^2/2/m*(k[f2]^2-k[f1]^2);

> solve({eq1,eq2},{k[f1],k[f2]});

in the final command i get a very messy numerical&symbolic results like

{k[f1] = 1016612041.*
(-1.*RootOf(9456017282782496601177464289*n^2*Pi^4...
Page 1 of 1