how to simply result from diff result

1 次查看(过去 30 天)
xueqi
xueqi 2013-6-2
Hi,
I used "diff" to differentiat an symbolic expression (which is a 2*1 matrix in terms of one variable "p1" )and I get the result is
if true
% (993145510909945291290970062799168703243609151945831132541235246491728972506726400000*p1^24)/(11*(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)) - (3441252636555596989920201187800307357046462757955062829318209447303288193024000000*p1^24*(19108119629907347404438264008256005850407040083437790990093366142500865431029415936*p1^25 - 141284835465018257235063952180851629982268381766690721762239555200372318157))/(11*(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)^2)
(3441252636555596989920201187800307357046462757955062829318209447303288193024000000*p1^24*(63693732099691158014794213360853352834690133611459303300311220475002884770098053120*p1^25 - 43472257854599900738270425141974962844044977607104383496234591147576231557))/(11*(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)^2) - (3310485036366484304303233542663895677478697173152770441804117488305763241689088000000*p1^24)/(11*(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)
end
Anyone can tell me how to simplify this result...I have used "simplify" but the result doesn't look better enough
if true
% (51061483509298234744021093266326713799853337869221735203326270028773557256849240290965339520235810633978267214726144573886032503926667005712580319641600000*p1^24)/(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)^2
-(36472488679003875759150208868231165720314307528440215941247217470038257246649230534343240731249455251103241160127018820611162429237123481071517696000000000*p1^24)/(66209700727329686086064670853277913549573943463055408836082349766115264833781760*p1^25 + 76000450310455048509674258747439313371109099869460786758580060874282689)^2
end

回答(1 个)

Roger Stafford
Roger Stafford 2013-6-2
You undoubtedly obtained this kind of baffling result because your original symbolic expression contained numerical values in decimal fraction form. It would be better to use short - preferably single character - symbols for these values before attempting to find the derivative. You can substitute numerical values for these afterward.

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by