MATLAB: How to use scatter plot

scatter

How do I use scatter plot: To get the value of zsol for each case v2sol is 0.4(For example) in the following code. Thanks for the help.
%
zspan=[0,400];
v0mat = [1 0.01 1;1 0.05 1;1 0.1 1;1 0.2 1];
zsol = {};
v1sol = {};
v2sol = {};
v3sol = {};
for k=1:size(v0mat,1)
v0=v0mat(k,:);
[z,v]=ode45(@rhs,zspan,v0);
zsol{k}=z;
v1sol{k}=v(:,1);
v2sol{k}=v(:,2);
v3sol{k}=v(:,3);
end
for k=1:size(v0mat,1)
figure(1)
plot(v2sol{k},zsol{k},'g')
hold on
xlabel('Velocity,w')
ylabel('Height, z')
grid on
end
function parameters=rhs(z,v)
alpha=0.116;
db= 2*alpha-(v(1).*v(3))./(2*v(2).^2);
dw= (v(3)./v(2))-(2*alpha*v(2)./v(1));
dgmark= -(2*alpha*v(3)./v(1));
parameters=[db;dw;dgmark];
end

Best Answer

Add this, after the code you posted:
for k1 = 1:length(v2sol)
zsol04(k1) = interp1(v2sol{k1}, zsol{k1}, 0.4)
end
figure
scatter(zsol04, ones(1,length(v2sol))*0.4, 'p')
grid