Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

MATLAB Script for Plotting an Osilo Diagram, Exercises of Mathematics

This matlab script allows users to input parameters for creating an osilo diagram, including the time interval, coefficients a and b, frequencies f1 and f2, and phases alpha and beta. The script then generates and displays the osilo diagram using the plot function.

Typology: Exercises

2018/2019

Uploaded on 12/17/2019

Doan
Doan 🇻🇳

2 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download MATLAB Script for Plotting an Osilo Diagram and more Exercises Mathematics in PDF only on Docsity! Bài tập nhỏ lập trình vẽ đồ thị Osilo Sinh viên : Trần Đình Khải %Them thoi gian do t = input('Nhap t= '); %Xac lap thong so cua do thi ham so xt A = input('Nhap bien do A= '); f1 = input('Nhap tan so f1= '); alpha = input('Nhap pha alpha= '); x = A*cos(2*pi*f1*t+alpha); %Xac lap thong so cua do thi ham so yt B = input('Nhap bien do B= '); f2 = input('Nhap tan so f2= '); beta = input('Nhap pha ban beta= '); y=B*cos(2*pi*f2*t+beta); disp(['Ve osiloscope ']); plot(x,y,'black','linewidth',2); xlabel('x'); ylabel('y'); title('Do thi Osiloscope'); grid on; Nhap t= [0:0.0002:4] Nhap bien do A= 2 Nhap tan so f1= 40 Nhap pha alpha= pi/5 Nhap bien do B= 3 Nhap tan so f2= 80 Nhap pha ban beta= pi/12 Ve osiloscope
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved