Prev: fft and ifft
Next: plotting problem
From: RAB John on 1 Aug 2010 14:52 Hello you Matlab Guru's, I have 2 transcendental equations in 3 variables (1 degree of freedom). I wish to efficiently plot equation set curve (or multiple curves as uniqness is not promised). Any suggestions rather than just placing values into one of the variables and "FOR" it? Thx, RAB
From: us on 1 Aug 2010 15:00 "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34fol$59u$1(a)fred.mathworks.com>... > Hello you Matlab Guru's, > > I have 2 transcendental equations in 3 variables (1 degree of freedom). I wish to efficiently plot equation set curve (or multiple curves as uniqness is not promised). > > Any suggestions rather than just placing values into one of the variables and "FOR" it? > > Thx, > RAB rather than words: show some ML code CSSMers can play with... us
From: RAB John on 1 Aug 2010 15:53 "us " <us(a)neurol.unizh.ch> wrote in message <i34g87$55c$1(a)fred.mathworks.com>... > "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34fol$59u$1(a)fred.mathworks.com>... > > Hello you Matlab Guru's, > > > > I have 2 transcendental equations in 3 variables (1 degree of freedom). I wish to efficiently plot equation set curve (or multiple curves as uniqness is not promised). > > > > Any suggestions rather than just placing values into one of the variables and "FOR" it? > > > > Thx, > > RAB > > rather than words: show some ML code CSSMers can play with... > > us cos(x1)+3cos(x2)-2cos(x3) = pi/3 -2cos(x1)+cos(2x2)+cos(x3) = pi/6 This equation set definitely have at least one curve as a solution. I wish to plot it wisely.
From: us on 1 Aug 2010 16:03 "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34jb3$etm$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <i34g87$55c$1(a)fred.mathworks.com>... > > "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34fol$59u$1(a)fred.mathworks.com>... > > > Hello you Matlab Guru's, > > > > > > I have 2 transcendental equations in 3 variables (1 degree of freedom). I wish to efficiently plot equation set curve (or multiple curves as uniqness is not promised). > > > > > > Any suggestions rather than just placing values into one of the variables and "FOR" it? > > > > > > Thx, > > > RAB > > > > rather than words: show some ML code CSSMers can play with... > > > > us > > cos(x1)+3cos(x2)-2cos(x3) = pi/3 > -2cos(x1)+cos(2x2)+cos(x3) = pi/6 > > This equation set definitely have at least one curve as a solution. I wish to plot it wisely. now, show CSSM how you derive the solution... us
From: Roger Stafford on 1 Aug 2010 16:27
"RAB John" <dkkddkkd(a)walla.com> wrote in message <i34jb3$etm$1(a)fred.mathworks.com>... > > > I have 2 transcendental equations in 3 variables (1 degree of freedom). I wish to efficiently plot equation set curve (or multiple curves as uniqness is not promised). > > > ...... > cos(x1)+3cos(x2)-2cos(x3) = pi/3 > -2cos(x1)+cos(2x2)+cos(x3) = pi/6 > ........ - - - - - - - - - - - - For this particular pair of equations, my advice would be to set a parameter t equal to cos(x2) and replace cos(2*x2) with its equal, 2*t^2-1. Then your two equations are linear in cos(x1) and cos(x3), so each of these cosines can be explicitly solved in terms of t. If you then let t vary from -1 to +1, all of these values for which cos(x1) and cos(x3) also both lie between -1 and +1 will furnish solutions for your equations using the acos function. In general there will be eight solutions within the range -pi to +pi for each such t, or one solution for the range 0 to +pi. You can use plot3 to plot these in terms of t. Roger Stafford |