1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Vectorization Method

  1. Mar 10, 2012 #1
    1. The problem statement, all variables and given/known data
    Would anyone know how to use the vectorization method for this question? I did it the loop method but I would also need to do it for vectorization method, any ideas?

    y(t) =sin(t) for all t where sint>0 elsewhere y(t)=0

    for -6 π ≤ t ≤ 6 π at intervals of π/10. Use vectorization to solve it.

    Thank you

    3. The attempt at a solution

    V = [all values of sin(t)]; k = number of elements in V

    for 1: k % Use if-else statements to filter the negatives and positives % When a value is negative, reference that element to change it to positives end

    Is this the vectorization method?
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted