Pregunta


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

más de 12 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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

más de 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 12 años hace | 4 respuestas | 6

4

respuestas

Pregunta


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

más de 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 12 años hace | 1 respuesta | 0

1

respuesta

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

más de 12 años hace | 0

Pregunta


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

más de 12 años hace | 3 respuestas | 0

3

respuestas

Pregunta


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

más de 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 12 años hace | 2 respuestas | 0

2

respuestas

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

más de 12 años hace | 0

| aceptada

Pregunta


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

más de 12 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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

más de 12 años hace | 5 respuestas | 0

5

respuestas

Pregunta


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

más de 12 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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

más de 12 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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,:...

más de 12 años hace | 4 respuestas | 0

4

respuestas