MATLAB Answers

Change the class from double to sym of a cell array

2 views (last 30 days)
RoboKid
RoboKid on 10 Nov 2013
Commented: RoboKid on 11 Nov 2013
Is there anyway to get D as [ s + 3 ; s + 2] in the following program.
i.e. I want to change the class of D from double to sym
syms s
D = {[1 3] ; [1 2]}
%N= {[1];[1] }
%G=tf(N,D)

Answers (1)

Walter Roberson
Walter Roberson on 10 Nov 2013
cellfun(@tf, N, D)
  3 Comments
RoboKid
RoboKid on 11 Nov 2013
I'm sorry .. I typed wrong s+3 instead s+1, I just wanted to change the class of D from 'cell' to sys.. and it's work with cellfun. thanks.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!