matlab中solve函数的用法。悬赏20分
solveSymbolicsolutionofalgebraicequations.

solve('eqn1','eqn2',...,'eqnN')
solve('eqn1','eqn2',...,'eqnN','var1,var2,...,varN')
solve('eqn1','eqn2',...,'eqnN','var1','var2',...'varN')
Theeqnsaresymbolicexpressionsorstringsspecifyingequations.The
varsaresymbolicvariablesorstringsspecifyingtheunknownvariables.
solveseekszerosoftheexpressionsorsolutionsoftheequations.
Ifnotspecified,theunknownsinthesystemaredeterminedbySYMVAR.
Ifnoanalyticalsolutionisfoundandthenumberofequationsequals
thenumberofdependentvariables,anumericsolutionisattempted.
Threedifferenttypesofoutputarepossible.Foroneequationandone
output,theresultingsolutionisreturned,withmultiplesolutionsto
anonlinearequationinasymbolicvector.Forseveralequationsand
anequalnumberofoutputs,theresultsaresortedinlexicographic
orderandassignedtotheoutputs.Forseveralequationsandasingle
output,astructurecontainingthesolutionsisreturned.
solve(...,'IgnoreAnalyticConstraints',VAL)controlsthelevelof
mathematicalrigortouseontheanalyticalconstraintsofthesolution
(branchcuts,divisionbyzero,etc).TheoptionsforVALareTRUEor
FALSE.SpecifyFALSEtousethehighestlevelofmathematicalrigor
infindinganysolutions.ThedefaultisFALSE.
solve(...,'PrincipalValue',VAL)controlswhethersolveshouldreturn
multiplesolutions,includingparameterizedinfinitesolutionsets
(ifVALisFALSE),orjustasinglesolution(whenVALisTRUE).
ThedefaultisFALSE.
solve(...,'IgnoreProperties',VAL)controlsifsolveshouldtake
assumptionsonvariablesintoaccount.VALcanbeTRUEorFALSE.
ThedefaultisFALSE(i.e.,takeassumptionsintoaccount).
solve(...,'Real',VAL)allowstoputthesolverinto"realmode."
In"realmode,"onlyrealsolutionssuchthatallintermediatevalues
oftheinputexpressionarerealaresearched.VALcanbeTRUE
orFALSE.ThedefaultisFALSE.
solve(...,'MaxDegree',n)controlsthemaximumdegreeofpolynomials
forwhichexplicitformulaswillbeusedduringthecomputation.
nmustbeapositiveintegersmallerthan5.Thedefaultis3.
Examples:
solve('psin(x)r')chooses'x'astheunknownandreturns
ans
asin(r/p)
pi-asin(r/p)
[x,y]solve('x^2+xy+y3','x^2-4x+30')returns
x
1
3
y
1
-3/2
Ssolve('x^2y^2-2x-10','x^2-y^2-10')returns
thesolutionsinastructure.
S
x:[8x1sym]
y:[8x1sym]
[u,v]solve('au^2+v^20','u-v1')regards'a'asa
parameterandsolvesthetwoequationsforuandv.
Ssolve('au^2+v^2','u-v1','a,u')regards'v'asa
parameter,solvesthetwoequations,andreturnsS.aandS.u.
[a,u,v]solve('au^2+v^2','u-v1','a^2-5a+6')solves
thethreeequationsfora,uandv.
Ssolve('x^(5/2)8^(10/3)')returnsallthreecomplexsolutions:
S
16
-45^(1/2)-4+42^(1/2)(5-5^(1/2))^(1/2)i
-45^(1/2)-4-42^(1/2)(5-5^(1/2))^(1/2)i
Ssolve('x^(5/2)8^(10/3)','PrincipalValue',true)selectsoneofthese:
S
-45^(1/2)-4+42^(1/2)(5-5^(1/2))^(1/2)i
Ssolve('x^(5/2)8^(10/3)','IgnoreAnalyticConstraints',true)
ignoresbranchcutsduringinternalsimplificationsand,inthiscase,
alsoreturnsonlyonesolution:
S
16
symstpositive
solve(t^2-1)
ans
1
solve(t^2-1,'IgnoreProperties',true)
ans
1
-1
solve(x^3-1)returnsallthreecomplexroots:
ans
1
-1/2+(3^(1/2)i)/2
-1/2-(3^(1/2)i)/2
solve(x^3-1,'Real',true)onlyreturnstherealroot:
ans
1
这是具体的用法,注意变量的选取。。。
苏州东锜公司始终坚持质量求生存、用户至上的信念和“追求卓越、打造精品”的经营理念,诚信、实力和产品质量获得业界的认可。以优质的产品、合理的价格,竭诚为广大客户提供优良的服务并和大家取得更好的经济效益,欢迎各界朋友莅临参观、指导和业务洽谈,我们将竭诚为你服务,共创美好的未来。

admin
发表评论