Question

0 solutions submitted (max Unlimited) Problem2 A staircase of height h is modeled by the parametric equations: x = rcos(1) y

matlab code please
0 0
Add a comment Improve this question Transcribed image text
Answer #1

%%%%Program to print profile of Staircase%%%%%
clc
clear all

%%%%%%Inputs%%%%%%%
n=4; %n=4 is given in problem
h=50; %Height of staircase is 50 m
t=0:pi/50:2*pi*n; %t is varied between 0 and 2*pi*n with an interval of pi/50 to get a smooth curve
r=h*(2+5*sin(t/8))/10; % r is defined as given in problem

%%%%%%Output%%%%%%%
x=r.*cos(t); %x as defined in problem at each 't'
y=r.*sin(t); %y as defined in problem at each 't'
z=(h*t)/(2*pi*n); %z as defined in problem at each 't'

%%%%%%Plotting the variables%%%%%
p=plot3(x,y,z)
p.LineWidth = 1.5; % Setting line width equal to 1.5
axis equal
xlabel('x(t)')
ylabel('y(t)')
zlabel('z(t)')

20 20 0 0 -20 -20 y(t) x(t)

Add a comment
Know the answer?
Add Answer to:
matlab code please 0 solutions submitted (max Unlimited) Problem2 A staircase of height h is modeled by the parametric equations: x = rcos(1) y = rsin(1) -=- trix where r=h[2 + 5 sin(1/8)]/10, n...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT