MATLAB Quiz1

MATLAB Quiz1 - xlabel't(SECONDS title'MY SIGNAL Gusev...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MATLAB Quiz #1 ECEN 314-501 Andriy Gusev
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
% Gusev Andriy ECEN 314 Quiz 1 %part 1 clear all ; clc; close all ; plot([-4 0], [0 4]) %we plot the line from point (x,y)=>(-4,0) to (0,4) hold on ; %in order to stop screen from refreshing and erasing our line plot([0 0], [4 -4]) % here is the vertical line plot([0 4], [-4 0]) % line that goes from (0,-4) to (4,0) axis([-4 4 -5 5]) ylabel( 'x(t)'
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ); xlabel( 't(SECONDS)' ); title( 'MY SIGNAL' ); % Gusev Andriy ECEN 314 Quiz 1 part 2 function [out] = over(vec, lim) % here is our function out=sum((vec>=lim).*vec); %we get the vector compare it to lim(scalar) %than dot it with our vector that we have so this is what happens for over([5 1 3 6 9],4) Vector sum([1 0 0 1 1].[5 1 3 6 9])= 5+6+9=20...
View Full Document

This note was uploaded on 09/11/2008 for the course ECEN 314 taught by Professor Halverson during the Spring '08 term at Texas A&M.

Page1 / 2

MATLAB Quiz1 - xlabel't(SECONDS title'MY SIGNAL Gusev...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online