Content Feed
질문
Golf Recamán's sequence
Recamán's sequence described in pseudo-code is as follows: A(0) = 0 A(n) = A(n-1) - n if A(n-1) - n > 0 and is new, else...
9년 초과 전 | 답변 수: 1 | 0
1
답변질문
Can I find out in which release a function was introduced?
Sometimes I get error messages saying stuff like: Undefined function 'savefig' for input arguments of type 'char' or ...
거의 10년 전 | 답변 수: 2 | 1
2
답변질문
x = 0:0.1:10... What's going on, really?
Please have a look at the following example: A = 0:0.1:0.4; find(A == 0.3) ans = Empty matrix: 1-by-0 fi...
거의 10년 전 | 답변 수: 3 | 2
3
답변답변 있음
Finding integers between two vectors
A= [4.54 5.11 9.58 15.04]; B= [1.01 3.2 5.5 16.98]; C = sort([A; B]); C(1,:) = ceil(C(1,:)); C(2,:) = floor(C(...
Finding integers between two vectors
A= [4.54 5.11 9.58 15.04]; B= [1.01 3.2 5.5 16.98]; C = sort([A; B]); C(1,:) = ceil(C(1,:)); C(2,:) = floor(C(...
10년 초과 전 | 0
| 수락됨
질문
Using bsxfun for non-numeric data
Is there an equivalent to bsxfun for non-numeric data? For example, I want to compare all pairs of strings stored in two cell...
거의 11년 전 | 답변 수: 3 | 3
3
답변질문
Find row number of elements
Hi, I have a list of branches, |BL|, and a list of nodes, |nodeList|. BL has two columns, containing to-from nodes for each b...
거의 11년 전 | 답변 수: 1 | 0
1
답변답변 있음
what is the meaning of BW = ~ BW?
It gives you back the inverted binary matrix BW. That means, all 1's turns to 0's, and vice versa. In plain text: BW = not...
what is the meaning of BW = ~ BW?
It gives you back the inverted binary matrix BW. That means, all 1's turns to 0's, and vice versa. In plain text: BW = not...
거의 11년 전 | 1
질문
Format axes in plot
Is it possible to color a single number (or a set of numbers) on one of the axes in Matlab? Suppose I have a plot: plot(...
거의 11년 전 | 답변 수: 1 | 0
1
답변질문
Legend in biograph plot
I have a |biograph| object, and I want to "color-code" the edges and vertices. Is it possible to get legends in the biograph...
거의 11년 전 | 답변 수: 0 | 1
0
답변답변 있음
Mean of 2 arrays
One way would be: mean(mean([imag{1} imag{2}])) If the dimensions don't match: mean([imag{1}(:); imag{2}(:)])
Mean of 2 arrays
One way would be: mean(mean([imag{1} imag{2}])) If the dimensions don't match: mean([imag{1}(:); imag{2}(:)])
거의 11년 전 | 1
답변 있음
Adding two different size matrices
You can't add matrices of different dimensions. The transpose of A has dimension (50x100) Think of it: A = [1 2 ...
Adding two different size matrices
You can't add matrices of different dimensions. The transpose of A has dimension (50x100) Think of it: A = [1 2 ...
거의 11년 전 | 0
| 수락됨
질문
Speed up sparse matrix calculations
Is it possible to speed up large sparse matrix calculations by e.g. placing parantheses optimally? What I'm asking is: Can I ...
거의 11년 전 | 답변 수: 0 | 0
0
답변답변 있음
Explanation of the code
The input to |cosd| and |sind| are in degrees, whereas it is in radians for |cos| and |sin|. l = sind(alpha)*b; % the verti...
Explanation of the code
The input to |cosd| and |sind| are in degrees, whereas it is in radians for |cos| and |sin|. l = sind(alpha)*b; % the verti...
거의 11년 전 | 1
질문
Profiling for cells instead of functions
I have a function that in turn calls many more functions. I want to use the profiler to identify what parts of the code is most ...
거의 11년 전 | 답변 수: 1 | 1
1
답변질문
Finding the difference between columns in matrix without loops
I have the results from an iterative process, where the results from each iteration is placed beside eachother, like this: ...
거의 11년 전 | 답변 수: 1 | 0
1
답변답변 있음
Not enough input arguments
Use lower case m, or some other letter that can't be mixed with upper case M, as indices in your for-loops, and you'll get there...
Not enough input arguments
Use lower case m, or some other letter that can't be mixed with upper case M, as indices in your for-loops, and you'll get there...
거의 11년 전 | 0
답변 있음
Please tell me what's wrong here with the exp (1j*theta)
The reason is that: 5 rad = -1.2832 rad % (-1.2832 + 2*pi = 5) That is: x = x + n*2*pi; % where x is an angle in...
Please tell me what's wrong here with the exp (1j*theta)
The reason is that: 5 rad = -1.2832 rad % (-1.2832 + 2*pi = 5) That is: x = x + n*2*pi; % where x is an angle in...
거의 11년 전 | 0
| 수락됨
답변 있음
Not enough input arguments
How do you call this function? You need input arguments when running it (you can't press F5 or something similar). You co...
Not enough input arguments
How do you call this function? You need input arguments when running it (you can't press F5 or something similar). You co...
거의 11년 전 | 0
| 수락됨
답변 있음
Help with Basic 2D Contour Plot
Follow the instructions from Friedrich, but flip the matrix around before you plot it. Now, Z(1,1) is in the origin, Z(1,2)...
Help with Basic 2D Contour Plot
Follow the instructions from Friedrich, but flip the matrix around before you plot it. Now, Z(1,1) is in the origin, Z(1,2)...
거의 11년 전 | 0
답변 있음
Help with Basic 2D Contour Plot
Will this work for you? q = zeros(4); for s=[0:1:3], for t=[0:1:3], q(t+1,s+1)=triarea(s,t) end...
Help with Basic 2D Contour Plot
Will this work for you? q = zeros(4); for s=[0:1:3], for t=[0:1:3], q(t+1,s+1)=triarea(s,t) end...
거의 11년 전 | 0
답변 있음
how can I create a vector with unknown length?
The most intuitive (and simple to implement) is probably bubble sort: <https://en.wikipedia.org/wiki/Bubble_sort> Since th...
how can I create a vector with unknown length?
The most intuitive (and simple to implement) is probably bubble sort: <https://en.wikipedia.org/wiki/Bubble_sort> Since th...
거의 11년 전 | 1
답변 있음
How to shift the origin or how to make median of the data to be origin or zero?
Do you just want to substract the median value? In that case: cc = aa-median(aa); Now the median of cc = 0. Hope it h...
How to shift the origin or how to make median of the data to be origin or zero?
Do you just want to substract the median value? In that case: cc = aa-median(aa); Now the median of cc = 0. Hope it h...
거의 11년 전 | 0
답변 있음
matrix manipulation and components
Is this what you're asking for? A(A>3.1) - Rob
matrix manipulation and components
Is this what you're asking for? A(A>3.1) - Rob
거의 11년 전 | 2
| 수락됨
답변 있음
How create serial RLC circuit in Simulink?
It looks as though your intial conditions are 0 for both integrators. Are you supposed to simulate the system in steady-stat...
How create serial RLC circuit in Simulink?
It looks as though your intial conditions are 0 for both integrators. Are you supposed to simulate the system in steady-stat...
거의 11년 전 | 0
답변 있음
traversing a long matrix
I think this should work ind = find(A(:,1) == A(:,2)); - Rob
traversing a long matrix
I think this should work ind = find(A(:,1) == A(:,2)); - Rob
거의 11년 전 | 0
| 수락됨
질문
Strange results from tic / toc.
I'm checking the running time of a function using tic/toc. I write the following in the command window (and execute it simultane...
거의 11년 전 | 답변 수: 1 | 1
1
답변답변 있음
Filling vector with a condition.
Like this? A = [1 2 -3 0 4 0 -5 0 6]; B = 10:19; C = zeros(1,length(A)); C(A>0) = B(A>0) C = ...
Filling vector with a condition.
Like this? A = [1 2 -3 0 4 0 -5 0 6]; B = 10:19; C = zeros(1,length(A)); C(A>0) = B(A>0) C = ...
거의 11년 전 | 2
답변 있음
I can correct the error. Help me please!!
This should work: [X,Y] = meshgrid(x,y); f = sin(power(X,2)-power(Y,2)) Hope it helps =)
I can correct the error. Help me please!!
This should work: [X,Y] = meshgrid(x,y); f = sin(power(X,2)-power(Y,2)) Hope it helps =)
거의 11년 전 | 0
| 수락됨