MATLAB Answers

How do I convert matlab file to pdf

2 502 views (last 30 days)
BEYZA NUR ULUOGLU
BEYZA NUR ULUOGLU on 29 Mar 2020
Answered: Ngo Tien Sang on 6 Mar 2021
I write code in matlab and then ı want to convert pdf, doc or doc x . How can I do this .
  1 Comment
madhan ravi
madhan ravi on 29 Mar 2020
You maybe looking for publish()
doc publish

Sign in to comment.

Answers (2)

Cris LaPierre
Cris LaPierre on 30 Mar 2020
If you are using a live script, the is an "Export to pdf" option in the Save menu on the home tab. Click the down arrow to expand the menu to see this and other options.
  3 Comments
Cris LaPierre
Cris LaPierre on 10 Oct 2020
Use the publish function.
publish('script.m','pdf')
You should also see a Publish tab when viewing a *.m script in the editor. Follow these steps to use a graphical approach.

Sign in to comment.


Ngo Tien Sang
Ngo Tien Sang on 6 Mar 2021
%bai1
Gc=tf([1], [1 1]);
Gp=tf([1 2], [1 3]);
Gtd=series(Gc,Gp);
Gtq=feedback(Gtd,1,-1);
Gtd=minreal(Gtq);
%bai3
j=10.8E8; k=10.8E8; a=1; b=8;
numc=[k k*a]; denc=[1 b]; sys1=tf(numc,denc);
nums=[1]; dens=[j 0 0]; sys2=tf(nums,dens);
sys3=series(sys1,sys2);
sys=feedback(sys3,[1]);
%bai4
num1=[1]; den1=[1 1]; sys1=tf(num1,den1);
num2=[1]; den2=[1 0 2]; sys2=tf(num2,den2);
num3=[4 2]; den3=[1 2 1]; sys3=tf(num3,den3);
num4=[1]; den4=[1 0 0]; sys4=tf(num4,den4);
sys5=tf(50);
num6=[1 0 2]; den6=[1 0 14]; sys6=tf(num6,den6);
sys7=series(sys1,sys2); sys8=parallel(sys7,sys3); sys9=feedback(sys8,[1]);
sys10=feedback(sys4,sys5,[1],1);
sys11=series(sys9,sys10);
sys12=parallel(sys11,sys6); sys13=feedback(sys12,[1]);
%bai5
numg=[1 1]; deng=[1 2]; sys1=tf(numg,deng);
numh=[1]; denh=[1 1]; sys2=tf(numh,denh);
sys=feedback(sys1,sys2);
%bai6
num1=[10]; den1=[1 1]; sys1=tf(num1,den1);
num2=[1]; den2=[2 0.5]; sys2=tf(num2,den2);
num3=540; den3=[0]; sys3=tf(num3,den3);
num4=0.1; den3=[0]; sys4=tf(num4,den4);
sys5=series(sys3,sys4);
sys6=parallel(sys5,sys4); sys7=feedback(sys6,[1])
sys8=feedback(sys7,sys3,[[1]);
%bai7
%a
Gs=tf([1], [1 10]);
%b
Gs=tf([1 5 3], [1 8 5]);
%c
Gs=tf([1 1], [1 3 3 1]);

Tags

Community Treasure Hunt

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

Start Hunting!