×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

repmat

repmat

(OP)
Hello
My program plots 1xtime triagle
but i just want that it plots 2xtime (with repmat)
How can i do it?
thx

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A = 3
f = 200

tend = 0.01
t = round (tend)
N0 = 10
fs = N0*f
N = round(tend*fs)


t1 = 0:0.005:N0/4
t2 = (N0/4):0.005:(3/4)*N0
t3 = ((3/4)*N0):0.005:N0

y1 = 4*A/N0*t1
y2 = -4*A/N0*t2 + 2*A
y3 = (4*A/N0)*t3 - 4*A

t = [t1 t2 t3];
y = [y1 y2 y3];


plot(t,y,'LineWidth',2)
axis([0 N -4 4])
set(gca,'XTick',[(0:9)*N/10])
set(gca,'XTicklabel',[0:9])
set(gca,'YTick',[-4 -3 -2 -1 0 1 2 3 4])
grid on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources