Recent content by p-williams65
-
P
Randomly Assigning 0 or 1 to a Vector in MATLAB
Figured it out; the problem wasn't the for loop. Thx.- p-williams65
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
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))...- p-williams65
- Thread
- Matlab
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
P
MATLAB - for loop for numerical integration
Haha. Just woke up, haven't had my coffee yet!- p-williams65
- Post #11
- Forum: Engineering and Comp Sci Homework Help
-
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 :)- p-williams65
- Post #9
- Forum: Engineering and Comp Sci Homework Help
-
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.- p-williams65
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
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.- p-williams65
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
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)...- p-williams65
- Thread
- Integration Loop Matlab Numerical Numerical integration
- Replies: 10
- Forum: Engineering and Comp Sci Homework Help