Question


find intersection between matrix and vector
I have a matrix and a vector: M = 1.0e+010 * 0.1499 0.2998 0.4497 0.0996 0.2495 0.3501 0.2002 0.0503...

plus de 13 ans il y a | 2 réponses | 0

2

réponses

Question


vector confusion
I have a vector A whose values are indices for vector P. Say A = 2 occurs 10 times. If I do: P(A) = P(A) + 1 P(2) = ...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Question


How do I plot lines with different line widths?
Hi, I want to do: plot(x1,y1,x2,y2,'LineWidth',8) but the linewidth propery ends up applying to both lines. Do I have to use two...

plus de 13 ans il y a | 4 réponses | 6

4

réponses

Question


vectorize this operation - help
Hi guys, I am trying to vectorize the following operations. k = [1 10:10:90]; p = 10:10:100 Note k and p are mad...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Question


Return equal values between sets.
I have two vectors a and b of different lengths that contain integers. How can I return those values that belong in both a and ...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
find values between constants in vector
ah. I think I got it: find(freq_n <= freq_in+10*delta_f & freq_n >= freq_in-10*delta_f) I was initially using && and tha...

plus de 13 ans il y a | 0

Question


find values between constants in vector
I have a vector freq_n where I want to find the indices corresponding to values between a and b. freq_in-10*delta_f <= freq_n...

plus de 13 ans il y a | 3 réponses | 0

3

réponses

Question


round-off issue?
I can't figure out why the floor wont come to 1752? >> 3.501/40*20*10^3+1.5 ans = 1.75200000000...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Question


trailing 01s and 9s
Hi guys, I'm having rounding issues in my answers: freq_in = 1.499; h = 0:1:H-1; f_harm = (h+1)*freq_in f_harm ...

plus de 13 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
matrix and vector indices out of range
Thinking about it, I could probably do: ind_plus_wi(ind_plus_wi < 1) = K/2+2 and X(ind_plus_wi) = v(i_M); X = X...

plus de 13 ans il y a | 0

| A accepté

Question


matrix and vector indices out of range
Hi guys, I have the following code: K = 20*10^3; X = zeros(1,K/2+1); w = 10 wi = repmat(1:w,length(i),1); ...

plus de 13 ans il y a | 2 réponses | 0

2

réponses

Question


create vector of repeating elements (sort of)
How can I easily create a vector such that: w = 3 n = 8 v = (1 w times) (2 w times) (3 w times) ... (n w time...

plus de 13 ans il y a | 5 réponses | 0

5

réponses

Question


Create matrix by adding elements of two vectors?
Hi guys, I have two vectors: h = 0 8 16 24 32 g = 0 1 2 3 4 5 ...

plus de 13 ans il y a | 2 réponses | 0

2

réponses

Question


Test every element in matrix
I have an M x N matrix, where I want to test whether each element is greater than some constant a, and if it is, perform some ar...

plus de 13 ans il y a | 1 réponse | 0

1

réponse

Question


Matrix with alternating signs in each row vector
Hi Guys, Is there a way to improve on this code that I wrote to optimize it? M = zeros(M,N); % create an MxN matrix M(1,:...

plus de 13 ans il y a | 4 réponses | 0

4

réponses