user3188157
user3188157

Reputation: 209

Transfer function into text file

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

Answers (1)

patrik
patrik

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

Related Questions