3D plot Between one known and two unknown parameter.

For a given equation, A.^2+B.^2=R
I need to plot between A,B and R where R is known(R lies between 1 to 10 for 100 resolutions) and A and B is not known.
Thanks in advance.

4 Kommentare

Not quite sure if this is what you want. But this plots the resulting circles, in this case continuously R = [1,10]
fimplicit3(@(A,B,R) A.^2 + B.^2 - R)
axis equal
zlim([1,10]); xlim([-4,4]); ylim([-4,4])
Thanks, but this is a plot for A,B and the function. I need plot for A,B and R.
In 2D, it will definitely give a circle.
hmm... I'm still not sure what you want. If you do want to have three "inputs" A,B and R there is no function anymore. It can be either true or false.
Example:
A = 1; B = 1; R = 2;
A^2 + B^2 == R % is true
ans = logical
1
A = 1; B = 1; R = 1;
A^2 + B^2 == R % is false
ans = logical
0
You could only plot the "true"-datapoints. But this would result in the same plot as above, if I'm not mistaken
Thank you.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Dyuman Joshi
Dyuman Joshi am 25 Mai 2023
Bearbeitet: Dyuman Joshi am 27 Mai 2023
"In 2D, it will definitely give a circle."
I assume you want to obtain all the circles corresponding to values in R in the same plot.
figure
hold on
%R lies between 1 to 10 for 100 resolutions
for R = linspace(1,10,100)
fimplicit(@(x, y) x.^2+y.^2-R)
end
grid on
hold off
Edit - You can also achieve this from the code mentioned in the comments by changing the view. But note that the resolution of R will not be same as you mentioned and as in the code above.
figure
fimplicit3(@(A,B,R) A.^2 + B.^2 - R)
axis equal
zlim([1,10]); xlim([-4,4]); ylim([-4,4])
view(2)

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 25 Mai 2023

Kommentiert:

am 28 Mai 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by