Prev: help required for generating .s19 file for a MPC 565 target using RTW and codewarrior.
Next: blanks(n)
From: babak yazdanpanah on 3 May 2010 10:33 hi, I had written a code that has a symbolic integration in it. the problem is that when i input more than '4' , for k,MATLAB sends me an answer that is useless for me or in another word i cant use that symbolic answer for the other calculations of my code.try it.here is that part of my code that i mentioned at the top: syms n tt g h=.01; Tm=3; k=input('please specify the volume fraction:'); KAm=17; KAc=29; KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm; o=int(1/KAn,g,-h/2,n); disp(o) please help me for God's sake...it is so urgent...please please please....
From: Torsten Hennig on 3 May 2010 06:53 > hi, > I had written a code that has a symbolic integration > in it. > the problem is that when i input more than '4' , for > k,MATLAB sends me an answer that is useless for me or > in another word i cant use that symbolic answer for > r the other calculations of my code.try it.here is > that part of my code that i mentioned at the top: > syms n tt g > h=.01; > Tm=3; > k=input('please specify the volume fraction:'); > KAm=17; > KAc=29; > KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm; > o=int(1/KAn,g,-h/2,n); > disp(o) > please help me for God's sake...it is so > urgent...please please please.... Then use quad to integrate numerically. Best wishes Torsten.
From: babak yazdanpanah on 4 May 2010 03:14 Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <73101288.63686.1272898442938.JavaMail.root(a)gallium.mathforum.org>... > > hi, > > I had written a code that has a symbolic integration > > in it. > > the problem is that when i input more than '4' , for > > k,MATLAB sends me an answer that is useless for me or > > in another word i cant use that symbolic answer for > > r the other calculations of my code.try it.here is > > that part of my code that i mentioned at the top: > > syms n tt g > > h=.01; > > Tm=3; > > k=input('please specify the volume fraction:'); > > KAm=17; > > KAc=29; > > KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm; > > o=int(1/KAn,g,-h/2,n); > > disp(o) > > please help me for God's sake...it is so > > urgent...please please please.... > > Then use quad to integrate numerically. > > Best wishes > Torsten. thank you for your attention.the problem is that i want the result in a symbolic form based on the symbolic variable'n',so i could use this answer in other parts of my code.
From: Walter Roberson on 4 May 2010 04:20
babak yazdanpanah wrote: > Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message > <73101288.63686.1272898442938.JavaMail.root(a)gallium.mathforum.org>... >> > the problem is that when i input more than '4' , for >> > k,MATLAB sends me an answer that is useless for me or >> > in another word i cant use that symbolic answer for >> > r the other calculations of my code. : >> > syms n tt g >> > h=.01; >> > Tm=3; >> > k=input('please specify the volume fraction:'); >> > KAm=17; >> > KAc=29; >> > KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm; >> > o=int(1/KAn,g,-h/2,n); >> > disp(o) > the problem is that i want the result in a > symbolic form based on the symbolic variable'n',so i could use this > answer in other parts of my code. You have not specified whether k (the input) will be an integer or not. If it is, then I don't know if MuPad would be able to solve it, but it would be possible in Maple up to k=20. For each integer k from 5 to 20, the form of the Maple symbolic integration involves an unevaluated root of degree k, with the polynomial being of the form A*x^k-1 = 0, with A being a positive integer. This problem is isomorphic to the task of finding the k complex roots of unity, which there is of course a general formula for. Thus, it is possible to pull apart the expression to locate the RootOf expression and to generate the complex roots of it, and substitute those back into the integral. But that's Maple; I do not have the Matlab MuPAD symbolic toolbox to see what kind of expression is returned "that is useless for me". Saying something is "useless for me" is useless for *us* unless you clarify what was returned and why it is not usable. Examples are good. |