I am trying to add multiple functions inside one master function. For example I want the follow three functions inside one file/function so that I can easily edit them with out changing between multiple files
function [Gc] = transferfunction_Gc
s = tf('s');
Gct=1;
Gcn=s*(s+1)^2;
Gc=Gct/Gcn;
end
function [Gp] = transferfunction_Gp
s = tf('s');
Gpt=1;
Gpn=s*(s+1)^2;
Gp=Gpt/Gpn;
end
function [H1] = transferfunction_H1
s = tf('s');
H1t=1;
H1n=s*(s+1)^2;
H1=H1t/H1n;
end
Is there anyway this is possible?
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/635544-multiple-functions-inside-one-m-file#comment_1107844
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/635544-multiple-functions-inside-one-m-file#comment_1107844
Sign in to comment.