"qi li" <liqi3837671@hotmail.com> wrote in message <jivlej$sg2$1@newscl01ah.mathworks.com>...
> Hi everyone,
> I have a problem and I cann't figure it out. the origin is from tempting to plot a 3d deformation sphere in SVM, it needs solve
> sigma(K(x,ai))=1
> where K is gaussian kernel trick,which means K(x,ai)=exp(aix^2/(2)),ai is 3 components vector,when i=1,2,3 a(:,1)=[1;1;1] a(:,2)=[2;2;2] a(:,3)=[3;3;3], x is [1;1;z] vector,z is varable ,so equation becomes
> for i=1:3
> s=s+exp(((1a(1,i))^2+(1a(2,i))^2+(za(3,i))^2)/(2))
> end
> then next equation s1=0 shoulde be figured out with 'z', who has the idea how to solve it? I found using fzero() may works,but if I have no idea about the initial value(I want all possible results of the equation) and in fact there may be hundreds of equations need to be solved(I make some simplications!).
>
> can someone help me? thanks advance
        
As long as your problem remains onedimensional with the single variable, z, (which I assume is real,) then a judicious use of the 'plot' function combined with 'fzero' ought to enable you to find all the roots in your problem. The more exponentials you sum, the larger the number of roots is likely to be. (I don't think there will be hundreds unless you have hundreds of exponentials.) Just plot your s as a function of z and observe the points in z where the curve appears to touch or cross the s = 1 level, and use your estimation of each point separately as an initial value in 'fzero'. Of course this means you will have to first compute s for a wide range of z values to be able to catch all roots this way. Piece of cake! (But it requires your participation in observing the plot very carefully.)
It is when you have more than one variable to vary that things become more complicated. For example, with two variables, z1 and z2, you would want to obtain the contour line on the twovariable function s(z1,z2) over some finelyspaced grid for s = some constant, and this in general would provide you with infinitely many solutions along the contour. I'm not sure what you would do with them all. With three variables the problem is even more complicated with solution spaces then being twodimensional in general.
Roger Stafford
