''Conversion to logical from sym is not possible.'' Please help
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
%This is a program on Continuous Fraction Expansion into a proper fraction using MATLAB. My program is attached...
clc; clear all;
syms s y z lo
% s=tf('s')
xy=1+(y*(s-1)/lo);
z=xy;
y=0.5;
lo=7;
n=3;
for m=6:-1:0
if mod(m,2)==0
lo=2+((n+y)*(s-1)/lo);
z=lo;
n=n-1;
else
xy=1+(y*(s-1)/lo);
lo=m+((n-y)*(s-1)/z);
% if m==6
% lo=7;
% end
end
end
disp('xy=')
pretty(xy)
% tf(xy)
% tol = 1.e-6*norm(xy(:),1);
[N,D] = rat(xy);
% fy=subs(xy,lo,7);
% disp('fy=')
% pretty(fy)
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!