Community Profile

photo

mrbond99


Last seen: 1 year ago Active since 2017

Followers: 0   Following: 0

Statistics

  • Thankful Level 3

View badges

Feeds

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;...

3 years 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 years 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 ...

4 years 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) = ...

4 years 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; ...

4 years 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?

6 years ago | 2 answers | 0

2

answers