How to plot a dispersion diagram like this?
27 views (last 30 days)
Amir Farrokhnejad on 3 Nov 2020
I need to plot such a diagram in matlab but I don't know how exactly I can do this. may you please help me to know how I would be able to plot a dispersion diagram like this one below?
Swetha Polemoni on 5 Nov 2020
It is my undersatanding that you want to draw ellipse, hyperbola and straight line in first quadrant. Try the following code and experiment with alpha, beta and f to get the exact diagram as you need.
%% plotting ellipse
axis([0 20 0 1])
%% plotting hyperbola
fun1 = @(x2,y2) y2.^2 - (x2/beta).^2 -1;
fimplicit(fun1,[0 20 0 2]);
%% plottig straight line