Info
This question is closed. Reopen it to edit or answer.
How to store values to the matrix and retrieve later as shown below ?
1 view (last 30 days)
Show older comments
I want to store values on L to J correspondently and make a plot later using J or L(If values can store in L instead J)
p(:,1) = [0;0];
r(:,1) = [0;0];
L(:,1) = [0];
J(:,1) = [0];
syms r1 r2
for n=1:0.1:x;
p =[0 (1/3)^n;(1/2)^n 0];
[V,D]=eig(p);
L= [V(2,1)/V(1,1)]
J(1,n)=L
end
0 Comments
Answers (1)
KSSV
on 27 Mar 2019
YOu can further reduce the variables:
m = 10 ;
L = zeros(m,1) ;
J = zeros(m,1) ;
x = 1:0.1:m ;
for i = 1:length(x)
n = x(i) ;
p =[0 (1/3)^n;(1/2)^n 0];
[V,D]=eig(p);
L(i) = [V(2,1)/V(1,1)] ;
end
1 Comment
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!