I have create an iteration as following:
format long
A=[1 0 2; -1 3 4; 2 1 0]
x_n=[-2 4 -3]'
for n=1:50
b_n(:,n)=A*x_n(:,n);
prox1(:,n)=1/3*((b_n(:,n))+[8 10 -8]');
y_n(:,n)=b_n(:,n)-prox1(:,n);
z_n(:,n)=A'*y_n(:,n);
h(n)=1/2*(norm(y_n(:,n)))^2;
gradh(n)=(norm(z_n(:,n)))^2;
u(n)=2*h(n)/gradh(n);
r_n(:,n)=x_n(:,n)-u(n)*z_n(:,n);
prox2(:,n)=1/3*(r_n(:,n)+[-2 -4 5]');
x_n(:,n+1)=((1/(1000*(n+1)))*[1 1 1]')+((1-(1/(1000*(n+1))))*prox2(:,n))
end
Now, I would like to plot all the values as points in the same three dimensional coordinate. If possible, how should I do?
Thank you so much in advance.

댓글 수: 1

Walter Roberson
Walter Roberson 2015년 7월 6일
Please be specific about which values are to be which axis. Are you looking for a series of 3D lines, x_n(:,n) vs y_n(:,n) vs z_n(:,n) ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 7월 6일

0 개 추천

plot3(x_n, y_n, z_n)
possibly, depending on what you want plotted.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2015년 7월 6일

답변:

2015년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by