How can I change this code to plot finger below
Mostrar comentarios más antiguos
Code:
clc;
clear all;
close all;
fs = 1000;
t = 0:1/fs:0.2;
Vm = 720; % Volt
f0 = 50 ;% Hz
q = 0.5 ; % Voltage Gain
alpha = 0;
Va = Vm*q*cos(2*pi*f0*t + alpha);
Vb = Vm*(q + 0.2*q*(t == 0.1)).*cos(2*pi*f0*t + alpha);
figure,
plot(t,Va,'r',t,Vb,'b');
xlabel('Time');
ylabel('Va and Vb');

3 comentarios
Rik
el 17 de Nov. de 2017
You mean you need the legend function?
Yasir Ghazi
el 17 de Nov. de 2017
Walter Roberson
el 17 de Nov. de 2017
Do you mean like
Vb = Vm*(q + 0.2*q*(t >= 0.1)).*cos(2*pi*f0*t + alpha);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
