Prev: fft and ifft
Next: plotting problem
From: John D'Errico on 1 Aug 2010 17:00 "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. The solution set (which does exist) will be a 1-manifold, (actually, a set of disjoint 1-manifolds) curves that lie in the R^3 space (x1,x2,x3). These curves each look rather like a bent ellipse, folded in half upon themselves. John
From: Roger Stafford on 1 Aug 2010 18:45 "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <i34n96$j33$1(a)fred.mathworks.com>... > "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34jb3$etm$1(a)fred.mathworks.com>... > > cos(x1)+3cos(x2)-2cos(x3) = pi/3 > > -2cos(x1)+cos(2x2)+cos(x3) = pi/6 > > > The solution set (which does exist) will be a 1-manifold, > (actually, a set of disjoint 1-manifolds) curves that lie in > the R^3 space (x1,x2,x3). These curves each look rather > like a bent ellipse, folded in half upon themselves. > > John - - - - - - - - - - - Yes I agree, John, though it is almost like a square outline in 3D with rounded corners and bent roughly ninety degrees around a diagonal. (And mirror images of this going off to infinity in all three directions.) I wonder if those equations are really what the OP wanted. I can't help feeling that the pi quantities in them would hint at equations that were meant to involve inverse cosines in some way. Roger Stafford
From: RAB John on 2 Aug 2010 10:48 "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i34te2$827$1(a)fred.mathworks.com>... > "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <i34n96$j33$1(a)fred.mathworks.com>... > > "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34jb3$etm$1(a)fred.mathworks.com>... > > > cos(x1)+3cos(x2)-2cos(x3) = pi/3 > > > -2cos(x1)+cos(2x2)+cos(x3) = pi/6 > > > > > The solution set (which does exist) will be a 1-manifold, > > (actually, a set of disjoint 1-manifolds) curves that lie in > > the R^3 space (x1,x2,x3). These curves each look rather > > like a bent ellipse, folded in half upon themselves. > > > > John > - - - - - - - - - - - > Yes I agree, John, though it is almost like a square outline in 3D with rounded corners and bent roughly ninety degrees around a diagonal. (And mirror images of this going off to infinity in all three directions.) > > I wonder if those equations are really what the OP wanted. I can't help feeling that the pi quantities in them would hint at equations that were meant to involve inverse cosines in some way. > > Roger Stafford Hi you guys, Thx a lot! BTW, no inverse function roger. This equation set is exactly what I'm working on. I eventually ended up with setting one of the variable as parameter (just a3 not the whole cos) and fsolved the remaining equation set (2 equations 2 variables). I rapped it all in a FOR loop and plotted it uusing plot3.
From: Alan B on 2 Aug 2010 18:13
"RAB John" <dkkddkkd(a)walla.com> wrote in message <i36lr6$9mo$1(a)fred.mathworks.com>... > "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i34te2$827$1(a)fred.mathworks.com>... > > "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <i34n96$j33$1(a)fred.mathworks.com>... > > > "RAB John" <dkkddkkd(a)walla.com> wrote in message <i34jb3$etm$1(a)fred.mathworks.com>... > > > > cos(x1)+3cos(x2)-2cos(x3) = pi/3 > > > > -2cos(x1)+cos(2x2)+cos(x3) = pi/6 > > > > > > > The solution set (which does exist) will be a 1-manifold, > > > (actually, a set of disjoint 1-manifolds) curves that lie in > > > the R^3 space (x1,x2,x3). These curves each look rather > > > like a bent ellipse, folded in half upon themselves. > > > > > > John > > - - - - - - - - - - - > > Yes I agree, John, though it is almost like a square outline in 3D with rounded corners and bent roughly ninety degrees around a diagonal. (And mirror images of this going off to infinity in all three directions.) > > > > I wonder if those equations are really what the OP wanted. I can't help feeling that the pi quantities in them would hint at equations that were meant to involve inverse cosines in some way. > > > > Roger Stafford > > Hi you guys, > > Thx a lot! > BTW, no inverse function roger. This equation set is exactly what I'm working on. > I eventually ended up with setting one of the variable as parameter (just a3 not the whole cos) and fsolved the remaining equation set (2 equations 2 variables). I rapped it all in a FOR loop and plotted it uusing plot3. Just out of curiosity - is there a versatile, robust algorithm for solving this problem given two arbitrary surfaces? We have marching squares for f(x,y)=k, and marching cubes for f(x,y,z)=k, is there anything so nice for this intersection problem? I suppose you could find each voxel that contains a section of both surfaces, then compute the piecewise-line-segment intersection curves going through those voxels. Is there anything better? |