You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
Solve equation for one unknown with one known parameter
2 views (last 30 days)
Show older comments
clear all
clc
a=0.5
x=linspace(-2*a,2*a,100)
eqn=@(x,y,a)(1/2*a^2)*[x^2./(2-(1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))-y^2./((1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))]-1==0;
solve(eqn,y)
Answer is
Unrecognized function or variable 'y'.
Error in naca (line 6)
solve(eqn,y)
how can I solve y for x matrix value
2 Comments
Star Strider
on 18 May 2021
The actual equations are:
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/621828/image.png');
figure
imshow(I)
.
Accepted Answer
Star Strider
on 18 May 2021
Try something like this —
a=0.5;
% x=linspace(-2*a,2*a,100)
x=linspace(-2*a,2*a,20);
eqn=@(x,y,a)(1/2*a^2)*[x^2./(2-(1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))-y^2./((1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))]-1;
for k = 1:numel(x)
yv(k,:) = fsolve(@(y)eqn(x(k),y,a), 10);
end
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Results = table(x', yv)
Results = 20×2 table
Var1 yv
_________ ______
-1 1.9833
-0.89474 2.1056
-0.78947 2.2028
-0.68421 2.2812
-0.57895 2.3444
-0.47368 2.3946
-0.36842 2.4335
-0.26316 2.4619
-0.15789 2.4805
-0.052632 2.4897
0.052632 2.4897
0.15789 2.4805
0.26316 2.4619
0.36842 2.4335
0.47368 2.3946
0.57895 2.3444
It might be necessary to use the uniquetol function to eliminate duplicate (or near-duplicate) values of ‘yv’ and thier associated ‘x’ values.
.
9 Comments
onur karakurt
on 18 May 2021
I think it is not correct
because first and last value of y must be zero.
Actually ı want to solve these equation.
(x/(2*a*cos(theta)))^2-(y/(2*a*sin(theta)))=1
(2*(sin(theta))^2)=p+sqrt(p^2+(y/a)^2)
p=1-(x/2*a)^2-(y/2*a)^2
Here I simplified these function to f(x,y) shown below. May be I make a mistake while simplifying equations. Here first and last y value must be zero
(1/2*a^2)*[x^2./(2-(1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))-y^2./((1-(x./(2*a))^2-(y./(2*a))^2)+sqrt((1-(x./(2*a))^2-(y./(2*a))^2)+(y./a)^2))]=1
Star Strider
on 18 May 2021
I’m lost.
What variables are known, what variables are to be solved for?
The fsolve fucntion can solve systems such as these, however more needs to be known about them.
onur karakurt
on 18 May 2021
x and a are known, y unknown.
Now ı trying to find the roots of y because it is nonlinear function.
when I fits x and a to any constant to find equation answers against the y values from 0 to 1 with 100 pieces. I saw infinite roots of y, I guess. But it must be any solution for this.
clear all
clc
a=0.5;
x=0.5;
y=linspace(0,1,100);
for i=1:size(y)
y=y(i,:);
z=(1e15)*((x./(2*a*cos(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-(y./(2*a*sin(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-1);
end
plot(y,z)
onur karakurt
on 18 May 2021
can you fid the roots of y for each x value while z=zero, a=0.5 and x=linspace(-2*a,2*a,100)
equation is this
z=(1e15)*((x./(2*a*cos(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-(y./(2*a*sin(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-1);
Star Strider
on 19 May 2021
Finding all the roots is going to be a challenge.
First, using fsolve (I also experimented with fzero) is not very revealing —
zfcn = @(x,y,a) (1e15)*((x./(2*a*cos(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-(y./(2*a*sin(asin(sqrt(((1-(x./(2*a)).^2-(y./(2*a)).^2)+sqrt((1-(x./(2*a)).^2-(y./(2*a)).^2).^2+(y./a).^2))./2))))).^2-1);
a=0.5;
x=linspace(-2*a,2*a,100);
S = zeros(numel(x),3);
for k = 1:numel(x)
[y,fv] = fsolve(@(y)zfcn(x(k),y,a), x(k));
S(k,:) = [x(k), y, fv];
end
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
Equation solved at initial point.
fsolve completed because the vector of function values at the initial point
is near zero as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.
Out = array2table(S,'VariableNames',{'x','y','FunctionValue'})
Out = 100×3 table
x y FunctionValue
________ ________ _____________
-1 -1 0
-0.9798 -0.9798 -0.22204
-0.9596 -0.9596 0
-0.93939 -0.93939 0.22204
-0.91919 -0.91919 0.22204
-0.89899 -0.89899 0
-0.87879 -0.87879 0
-0.85859 -0.85859 0
-0.83838 -0.83838 0
-0.81818 -0.81818 0
-0.79798 -0.79798 0
-0.77778 -0.77778 0
-0.75758 -0.75758 0
-0.73737 -0.73737 0
-0.71717 -0.71717 0
-0.69697 -0.69697 0
Second, a relatively easy way to determine the roots is to plot them using the contour function, drawing contours at the roots of ‘z’ —
y = linspace(-2*pi, 2*pi);
[Xm,Ym] = ndgrid(x,y);
Zm = zfcn(Xm,Ym,a);
figure
[M,h] = contour(Xm,Ym,Zm, [0 0]); % Draw Contours Only At z=0
grid
title('Contour Map of (x,y) Coordinates Where z=0')
xlabel('x')
ylabel('y')
% axis('equal')
Choose whatever limits you want for ‘y’. Here, I chose the interval .
So there are myriad symmetrical roots —
format shortE
M
M = 2×10722
0 -1.0000e+00 -9.7980e-01 -9.5960e-01 -9.5296e-01 -9.5960e-01 -9.6839e-01 -9.7980e-01 -9.9197e-01 -1.0000e+00 0 -1.0000e+00 -9.7980e-01 -9.6466e-01 -9.5960e-01 -9.5339e-01 -9.3939e-01 -9.2945e-01 -9.1919e-01 -9.1044e-01 -9.1528e-01 -8.9899e-01 -8.8995e-01 -8.8131e-01 -8.7879e-01 -8.7605e-01 -8.5859e-01 -8.4236e-01 -8.3838e-01 -8.1818e-01
9.0000e+00 -6.2233e+00 -6.2400e+00 -6.1954e+00 -6.1563e+00 -6.0802e+00 -6.0293e+00 -5.9283e+00 -6.0293e+00 -6.0905e+00 6.0000e+01 -5.8454e+00 -5.8875e+00 -5.7755e+00 -5.7244e+00 -5.6485e+00 -5.5255e+00 -5.6485e+00 -5.7244e+00 -5.6485e+00 -5.5216e+00 -5.4117e+00 -5.5216e+00 -5.6485e+00 -5.7041e+00 -5.6485e+00 -5.5861e+00 -5.5216e+00 -5.4043e+00 -5.4184e+00
format short
See the documentation for contour and specifically for M to understand how to retrieve the values that contour creates.
This is the only way I can think of to solve this.
.
More Answers (0)
See Also
Categories
Find more on Linear Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)