Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How can I change this code to plot finger below without line red coler

1 view (last 30 days)
clc;
clear all;
close all;
fs = 1000;
t = 0:1/fs:0.2;
Im = 504.38; % Volt
f0 = 60 ;% Hz
q = 0.5 ; % Voltage Gain
a=0.5;
alpha = 0;
Ia = Im*q*(a*(cos(2*pi*f0*t + alpha)))+((1-a)*(cos(2*pi*f0*t + alpha)));
Ib = Im*(q - 0.2*q*(t>= 0.1)).*(a*(cos(2*pi*f0*t + alpha)))+((1-a)*(cos(2*pi*f0*t + alpha)));
figure,
plot(t,Ia,'r',t,Ib,'b');
xlabel('Time');
ylabel('Ia and Ib');

Answers (1)

Bshara Murr
Bshara Murr on 18 Nov 2017
Edited: Walter Roberson on 18 Nov 2017
clc; clear all; close all;
fs = 1000; t = 0:1/fs:0.2;
Im = 504.38; % Volt
f0 = 60 ;% Hz
q = 0.5 ; % Voltage Gain
a=0.5;
alpha = 0;
Ia = Im*q*(a*(cos(2*pi*f0*t + alpha)))+((1-a)*(cos(2*pi*f0*t + alpha)));
Ib = Im*(q - 0.2*q*(t>= 0.1)).*(a*(cos(2*pi*f0*t + alpha)))+((1-a)*(cos(2*pi*f0*t + alpha)));
plot(t,Ib,'b'); xlabel('Time'); ylabel('Ia and Ib');

This question is closed.

Community Treasure Hunt

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

Start Hunting!