common multiplicity.or I can't obtain results.

1 回表示 (過去 30 日間)
STamer
STamer 2012 年 3 月 22 日
clear all
clc
syms a1 a2 a3 a4 a5 z lamda El atm L m
N1=(z^2)*(z-L);
N2=(z^3)*(z-L);
N3=(z^4)*((z-L)^2);
v=a1*N1+a2*N2+a3*N3
y=diff(v,2,z)
pi=(0.5*El*atm*int(y^2,z,0,L)-(0.5*lamda*m*int(v^2,z,0,L)));
d1=diff(pi,a1);
d2=diff(pi,a2);
d3=diff(pi,a3);
d1a1=diff(d1,a1);
d1a2=diff(d1,a2);
d1a3=diff(d1,a3);
d2a1=diff(d2,a1);
d2a2=diff(d2,a2);
d2a3=diff(d2,a3);
d3a1=diff(d3,a1);
d3a2=diff(d3,a2);
d3a3=diff(d3,a3);
C=[d1a1 d1a2 d1a3;d2a1 d2a2 d2a3;d3a1 d3a2 d3a3]
D=det(C)
s=solve('(128*El^3*L^17*atm^3)/245 - (2944*El^2*L^21*atm^2*lamda*m)/1226225 + (77447*El*L^25*atm*lamda^2*m^2)/87405318000 - (29*L^29*lamda^3*m^3)/2097727632000','lamda')
w=s.^0.5
Hello I have written this code.and I need to take the solution common multiplicity paranthesis. ((El*atm)/(L^4*m))^0.5=1 please help me. I can't obtain clear results.
w1=15, w2=76, w3=105, i need to obtain these results
  1 件のコメント
STamer
STamer 2012 年 3 月 22 日
s=solve('(128*El^3*L^17*atm^3)/245 - (2944*El^2*L^21*atm^2*lamda*m)/1226225 + (77447*El*L^25*atm*lamda^2*m^2)/87405318000 - (29*L^29*lamda^3*m^3)/2097727632000','lamda')
w=s.^0.5
(El*atm)/(L^4*m)=1 how can i put these in my equation.or how can i divide my results to (El*atm)/(L^4*m)..so my results will be clear.because (El*atm)/(L^4*m) is common for my resluts.

サインインしてコメントする。

採用された回答

Alexander
Alexander 2012 年 3 月 22 日
If you have MATLAB R2012a you can use assume and simplify to do the trick:
>> assume((El*atm)/(L^4*m)==1)
>> double(simplify(w))
ans =
1.0e+02 *
2.4753 - 0.0000i
0.1544 - 0.0000i
0.5085 + 0.0000i
If you have an older version of MATLAB you can use evalin (note that this time there is only one '='):
>> evalin(symengine, 'assume((El*atm)/(L^4*m)=1)')
>> double(simplify(w))
ans =
1.0e+02 *
2.4753 - 0.0000i
0.1544 - 0.0000i
0.5085 + 0.0000i
This gives w1 = 15, however the other results are 247 and 50. Not sure, how to get to 76 and 105.
If both ways don't suit you, you can also rewrite your equation to El = L^4*m/atm and use subs to substitute El by L^4*m/atm:
>> double(subs(w, El, L^4*m/atm))
...

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by