Gather specially vector satisfied the condition

1 view (last 30 days)
Yeachan Choi
Yeachan Choi on 21 Apr 2022
Commented: Yeachan Choi on 21 Apr 2022
I want to gather specially vector that satisfied the condition :
x_1n = 1.5*randn(1,np); x_n = [x_1n; 0.5*(x_1n+randn(1,np))]; X = [x_1,...,x_100]
How can I put in 100 of vector in X in MATLAB? (like creating vector space?)

Accepted Answer

KSSV on 21 Apr 2022
X = zeros(np) ;
x = 1.5*randn(np,1);
for i = 2:np
X(:,i) = 0.5*(X(:,i-1)+randn(np,1));
Yeachan Choi
Yeachan Choi on 21 Apr 2022
And I think It's right your first answer, because I can see in matlab that x_n is 2*100, and X is 100*100 thank you very much.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!