Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: select positive part of sin only
Replies: 3   Last Post: Mar 25, 2013 5:55 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 78
Registered: 2/23/10
select positive part of sin only
Posted: Mar 24, 2013 3:19 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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:
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:

clear all

% ----------------
% entered the values
% ----------------

a= input('The depth energy is = ');
b= input('Number of Holes is = ');

for i=1:b
x=[zeros(1,20) a*sin(2*pi*t) zeros(1,20)];

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.