Reputation: 209
Is there any way to display multiple transfer functions in a text file generated from the script in Matlab? I can't even figure out how to transform them into strings if that is the option to put them into the file.
Upvotes: 1
Views: 879
Reputation: 4558
I found this somewhere on the web. It seems to give the desired output.
transferFunction = tf(1,[1,1,1]);
fid = fopen('test.txt','w');
tfString = evalc('transferFunction');
fprintf(fid,'%s',tfString);
fclose(fid);
Upvotes: 1