Feeds
질문
How to get intlinprog to stop when the answer is good enough?
The code below finds an maximum independent set of the graph whose adjacency matrix is A. I would like to pass an option to intl...
대략 4년 전 | 답변 수: 1 | 0
1
답변답변 있음
Sum elements of a vector based on given indices
There are faster ways of accomplishing your task in Matlab. First, let's examine if there is a function that will do what you...
Sum elements of a vector based on given indices
There are faster ways of accomplishing your task in Matlab. First, let's examine if there is a function that will do what you...
9년 초과 전 | 1
질문
Which view should I use with vis3d?
I plot 3D data, then make a movie where each frame is the same plot at different views. It is important for (i) the axes propor...
11년 초과 전 | 답변 수: 0 | 0
0
답변질문
Display Text Without Formatting
The following string displays in the command window formatted as a hyperlink. How do I display the entire contents of str witho...
대략 12년 전 | 답변 수: 5 | 6
5
답변답변 있음
Angle Comparison
If I understand this setup correctly, then the following is true. Take a line segment (I take this to be what you mean by side)...
Angle Comparison
If I understand this setup correctly, then the following is true. Take a line segment (I take this to be what you mean by side)...
12년 초과 전 | 0
답변 있음
strings in a loop
Sven, In most Matlab functions that display text, you can pass a cell array of strings to accomplish new lines. The example ...
strings in a loop
Sven, In most Matlab functions that display text, you can pass a cell array of strings to accomplish new lines. The example ...
12년 초과 전 | 0
| 수락됨
답변 있음
conversion
Baba, This will do what you described. structVar(1).name = 'First'; structVar(2).name = 'Second'; makeVarFun = @(s...
conversion
Baba, This will do what you described. structVar(1).name = 'First'; structVar(2).name = 'Second'; makeVarFun = @(s...
12년 초과 전 | 0
답변 있음
Non-linear Optimization for adjusting one trajectory to another (one matrix transformed to match other).
Try an anonymous function handle instead of an inline function, like this. difference_fun = @(x) norm( T1 - x(4)*T2 * ... ...
Non-linear Optimization for adjusting one trajectory to another (one matrix transformed to match other).
Try an anonymous function handle instead of an inline function, like this. difference_fun = @(x) norm( T1 - x(4)*T2 * ... ...
12년 초과 전 | 0
| 수락됨
답변 있음
Switch Case where case is a word_anynumber
If all of your cases are similar to what you describe, then you can use strtok like this. a = 'word_4'; b = 'word_27'; ...
Switch Case where case is a word_anynumber
If all of your cases are similar to what you describe, then you can use strtok like this. a = 'word_4'; b = 'word_27'; ...
12년 초과 전 | 0
답변 있음
FASTA AND BLAST
The following commands and output says there are not such functions. >> help fasta fasta not found. Use the Help br...
FASTA AND BLAST
The following commands and output says there are not such functions. >> help fasta fasta not found. Use the Help br...
12년 초과 전 | 0
답변 있음
Reflection of a surface across an axis
Braden, This example should help you see what to do. hand = surf(peaks); set(hand, 'XData', -1*get(hand,'XData'));
Reflection of a surface across an axis
Braden, This example should help you see what to do. hand = surf(peaks); set(hand, 'XData', -1*get(hand,'XData'));
12년 초과 전 | 0
| 수락됨
답변 있음
Gaussian Propability Area at different alpha
I believe this will accomplish your purpose. Let me know. LoS = .99; % Your level of significance lower = (1 - LoS) / ...
Gaussian Propability Area at different alpha
I believe this will accomplish your purpose. Let me know. LoS = .99; % Your level of significance lower = (1 - LoS) / ...
12년 초과 전 | 0
답변 있음
Sphere into equal parts
Abhinendra, I believe what you are looking for can be accomplished with this item ( <http://www.mathworks.com/matlabcentral/fil...
Sphere into equal parts
Abhinendra, I believe what you are looking for can be accomplished with this item ( <http://www.mathworks.com/matlabcentral/fil...
12년 초과 전 | 0
질문
speed of rand vs randi
I sometimes use "if rand < 0.5" or "if randi(2) == 1" to arbitrarily select one branch or another with equal probability. I ran...
12년 초과 전 | 답변 수: 1 | 0
1
답변답변 있음
multiplying adjacent values in matrix
See if this works for you. A = primes(100); B = A(1:end-1) .* A(2:end);
multiplying adjacent values in matrix
See if this works for you. A = primes(100); B = A(1:end-1) .* A(2:end);
12년 초과 전 | 0
| 수락됨
답변 있음
Is there an elegant way to create dynamic array in MATLAB?
liangjian, You can preallocate based on the number of iterations. Try something like this. numIter = 100; array = ...
Is there an elegant way to create dynamic array in MATLAB?
liangjian, You can preallocate based on the number of iterations. Try something like this. numIter = 100; array = ...
12년 초과 전 | 1
답변 있음
randperm
If you want to randomly permute the rows, do something like the following. n = 5; A = reshape(1:2*n, n, 2) B = A(rand...
randperm
If you want to randomly permute the rows, do something like the following. n = 5; A = reshape(1:2*n, n, 2) B = A(rand...
12년 초과 전 | 0
답변 있음
Need help for cross checking of eigen Vector
This gives a possible set of unit eigenvectors. [V,D] = eig(A) If there is an eigenspace of more than one dimension, the vec...
Need help for cross checking of eigen Vector
This gives a possible set of unit eigenvectors. [V,D] = eig(A) If there is an eigenspace of more than one dimension, the vec...
12년 초과 전 | 1
| 수락됨
답변 있음
how to initialize an M×N array whose size is unknown in for-loop
A. Hill, You can probably get a good estimate of the number of elements by examining the file sizes. Suppose the files are i...
how to initialize an M×N array whose size is unknown in for-loop
A. Hill, You can probably get a good estimate of the number of elements by examining the file sizes. Suppose the files are i...
12년 초과 전 | 0
답변 있음
Minimize function with respect to multiple variables
You can use the function fminsearch for this, which requires an initial guess. Here is how it might look for you. x = 1; ...
Minimize function with respect to multiple variables
You can use the function fminsearch for this, which requires an initial guess. Here is how it might look for you. x = 1; ...
12년 초과 전 | 5
| 수락됨
답변 있음
How to put stacked plots in the same graph
Alan, To plot the data all in the same plot, do something like the following. x1 = 0:.01:1; y1 = x1.^2; x2 = .5:.1...
How to put stacked plots in the same graph
Alan, To plot the data all in the same plot, do something like the following. x1 = 0:.01:1; y1 = x1.^2; x2 = .5:.1...
12년 초과 전 | 1
| 수락됨
답변 있음
Warning: Imaginary part is currently ignored.
This warning means that one of the inputs to atan2 is imaginary. The two places you use atan2 are extracted below. q2=atan...
Warning: Imaginary part is currently ignored.
This warning means that one of the inputs to atan2 is imaginary. The two places you use atan2 are extracted below. q2=atan...
12년 초과 전 | 0
| 수락됨
답변 있음
Re-arranging an exponential function of 2 parts
Simon, There is no logarithm rule that allows you to solve for x explicitly. However, from differentiating we can see that i...
Re-arranging an exponential function of 2 parts
Simon, There is no logarithm rule that allows you to solve for x explicitly. However, from differentiating we can see that i...
12년 초과 전 | 0
답변 있음
Changing the radial axislabels in a polar plot
Jakob, This is a necessarily, I think, imprecise process. That is, this method may become invalid with later distributions o...
Changing the radial axislabels in a polar plot
Jakob, This is a necessarily, I think, imprecise process. That is, this method may become invalid with later distributions o...
12년 초과 전 | 0
| 수락됨
답변 있음
How to create a probability table and derive probability results
Hi sim, If I understand correctly, then 'jpdf=X./Y;' should use element-wise multiplication like 'jpdf=X.*Y;'. Also, calcula...
How to create a probability table and derive probability results
Hi sim, If I understand correctly, then 'jpdf=X./Y;' should use element-wise multiplication like 'jpdf=X.*Y;'. Also, calcula...
12년 초과 전 | 0
| 수락됨
질문
unexpected accumarray behavior
I recently discovered the function accumarray. Example 2 in the doc for this function produced a counter-intuitive answer for m...
12년 초과 전 | 답변 수: 2 | 1
2
답변질문
Multiple Views of Data
I would like to plot multiple sets of data via the patch function, then have two different views display in two different window...
대략 13년 전 | 답변 수: 1 | 0
1
답변답변 있음
Can Matlab vectorize a generic recursion function?
Please clarify your question and what you mean by vectorize. If I understand your setup correctly, then a function to solve for...
Can Matlab vectorize a generic recursion function?
Please clarify your question and what you mean by vectorize. If I understand your setup correctly, then a function to solve for...
대략 13년 전 | 0