Community Profile # mrbond99

##### Last seen: Today
6 total contributions since 2017

• 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

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

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

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

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