Substitution to make it simple...
조회 수: 1 (최근 30일)
이전 댓글 표시
there is recursive sequence and v(2)=...v(1) and v(3)=...v(2)+...v(1) and so on... i want to remove v(2) and replace it with v(2)=...v(1) , at the other hand i need v(3) to be just function of v(1). take a look at the code...
%
%%Initialization
clc;clear all;
VLL=63;
Vph=VLL/(sqrt(3));
N=5;
m=10;
n=5;
%%Body
syms v(k)
flag=0;
for counter=2:N
if counter==2
disp(['Number',num2str(counter)])
v=symfun([(2+1/m)*v(k-1)],k);
v(counter)
clear v
else
syms v(k)
disp(['Number',num2str(counter)])
v=symfun([(2+1/m)*v(k-1)]-v(k-2),k);
v(counter)
end
end
end
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!