Community Profile

photo

mrbond99


Last seen: Today
6 total contributions since 2017

mrbond99's Badges

  • Thankful Level 2

View details...

Contributions in
View by

Question


How to get the index from a matrix?
Hi. I have a problem where I need to update the index value with a larger index if elements in A greater than B.. A = [2;7.5;9;...

6 days ago | 1 answer | 0

1

answer

Question


How to sum every elements that have the same frequency?
Suppose I have 2 vectors of the same length. A = [0.2 0.4 0.8 0.6 1.2 0.3]; B = [ 2 2 1 2 1 1]; The result tha...

3 months ago | 1 answer | 0

1

answer

Question


Why can't it proceed to the next iteration of for 'runs' loop?
nruns = 10; nphoton = 100; m = nphoton; for runs = 1:nruns q(:,runs) = rand(nphoton,1); while m > 0 ...

5 months ago | 1 answer | 0

1

answer

Question


How to use vectorization to sum every five elements in 100x1 vector?
I have tried this code.. c = (1:100)'; % Dummy data for n = 1:20 % This one works m(n) = 1 + (n - 1)*5; p(n) = ...

5 months ago | 1 answer | 0

1

answer

Question


How to compare every elements of a vector and update its element with a new one?
wo = [0.200,0.367,0.100,0.100,1.667]; k = 1:size(wo,2); min_power(wo(k) >= 0.90) = 1e-4; min_power(wo(k) >= 0.70) = 1e-5; ...

5 months ago | 1 answer | 0

1

answer

Question


How to plot y(n) over the range of 0<n<50. the equation given is y(n) = 1.97y(n-1) - y(n-2)
the conditions for y(0) =0 and y(1) =1. do i need to use while statement?

3 years ago | 2 answers | 0

2

answers