Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


alfann
Posts:
78
Registered:
2/23/10


select positive part of sin only
Posted:
Mar 24, 2013 3:19 PM


Hi, I have a small work: 1 I need to select only the positive part of the sin wave. 2 I need to keep a distance between each part of the positive wave as in this link: http://7adab.com/upload/uploads/images/7adab20126d88a21ef8.png 3How can I select the values of Xaxis? for example: If I want to represent the xaxis as a thickness of a material, how can I give the program the thickness of the material to be considered as Xaxis values.
Here is my code:
clc clear all
%  % entered the values % 
a= input('The depth energy is = '); b= input('Number of Holes is = ');
for i=1:b t=i*0:i*0.005:i*0.5; x=[zeros(1,20) a*sin(2*pi*t) zeros(1,20)]; plot(x); end



