Recent content by p-williams65

  1. P

    Randomly Assigning 0 or 1 to a Vector in MATLAB

    Figured it out; the problem wasn't the for loop. Thx.
  2. P

    Randomly Assigning 0 or 1 to a Vector in MATLAB

    Homework Statement Hi. The problem assigned to me is to take a column vector of 100 entries and then to randomly assign add a 0 or 1 to a random entry, and then to repeat this "n" # of times, where the upper "n" is 1 million. I have this so far h = zeros(100,1) h(round(rand(1)*100))...
  3. P

    MATLAB - for loop for numerical integration

    Haha. Just woke up, haven't had my coffee yet!
  4. P

    MATLAB - for loop for numerical integration

    Thanks very much -viscous-, your first solution worked perfectly; now to look it over and learn from it :)
  5. P

    MATLAB - for loop for numerical integration

    Doesn't work either. I know a "for" loop would work, summing up the single "areas" to a specific value of x for each x, but I don't know how to implement it.
  6. P

    MATLAB - for loop for numerical integration

    I tried it, no dice, I don't think that's a MATLAB command. Thanks for the post though.
  7. P

    MATLAB - for loop for numerical integration

    MATLAB - "for" loop for numerical integration Hi. The following bit of MATLAB function is supposed indefinitely integrate successive points: % Explode triplet format into vectors x_in = data_in(:,1)'; y_in = data_in(:,2)'; e_in = data_in(:,3)'; x_left=x_in(1:end-1)...
Back
Top