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/7adab2012-6d88a21ef8.png 3-How can I select the values of X-axis? for example: If I want to represent the x-axis as a thickness of a material, how can I give the program the thickness of the material to be considered as X-axis 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