回答済み
How to create a 3-D ternary plot
I don't know of any built-in way to do exactly this in basic MATLAB. It could be done as a custom function, but I don't think i...

15年以上 前 | 1

回答済み
Using slider in GUIDE to perform 2 tasks
For task 2, do exactly the same thing you did with task 1, except add 1. You might be having trouble with adding 1 because you ...

15年以上 前 | 2

| 採用済み

回答済み
Opening a file that requires another file for input
Get the string in the listbox, and pass it to the function which needs it. In the callback for the pushbutton, you put somethin...

15年以上 前 | 1

回答済み
k=1;201;
It means: set the variable k to equal 1, then set the variable ans to 201, displaying nothing. You can see this by executing ...

15年以上 前 | 0

回答済み
rotation about a point
Perhaps an example would work. You can use the function ROTATE to do what you want. I have shown an example, with minimal comm...

15年以上 前 | 0

回答済み
Fzero returns non-zero value
Include all the details, meaning: the function DPHIDLAMBDA, and the parameters used to call FZERO (q0,langd, Amax, etc). I...

15年以上 前 | 0

回答済み
data manipulation
I think this file does exactly what you are looking to do: <http://www.mathworks.com/matlabcentral/fileexchange/24536-expand>...

15年以上 前 | 2

| 採用済み

回答済み
how to store eigen vectors of a matrix of huge dimension?
If X is your 500-by-500 array, then using: [V,D] = eig(X) will store the eigenvalues in array V.

15年以上 前 | 0

| 採用済み

回答済み
FETCH LARGEST NUMBERS
1. Take the capslock off. 2. Sort your array in descending order. Use the SORT function. 3. Take the first 3 numbers in th...

15年以上 前 | 2

| 採用済み

回答済み
"roots" function not working
You have a variable named roots. Do this : clear roots p = [1 -6 -72 -27]; r = roots(p); Don't name variables after bu...

15年以上 前 | 3

| 採用済み

回答済み
word scrambler script
I suspect the problem comes from your (seeming) assumption that the code inside the IF statement only operates on those elements...

15年以上 前 | 0

回答済み
How to specific random numbers rang?
As Walter stated, this is not really possible exactly. However, you can get close (to some level of tolerance): x = ceil(4...

15年以上 前 | 1

回答済み
If statements with matricies
You might want the two output version of FIND. The one output version does not return the row number, but the linear index. ...

15年以上 前 | 1

| 採用済み

回答済み
Error correction...inner matrix dimensions must be same??? how to correct ?
You must put a dot before any *, / or ^ used when you want element-by-element operations on arrays of the same size. Note that ...

15年以上 前 | 1

回答済み
Solve a cubic equation using MATLAB code
From your comments, it looks like you want this instead: function [] = solve_cubic() w=10:2:30; a=4*((9*w)-7); ...

15年以上 前 | 1

| 採用済み

回答済み
Multiply then sum elements of two matrices
Another (this should be faster than calling SUM): reshape(A,1,[])*reshape(B,[],1)

15年以上 前 | 1

回答済み
sprintf problems
I assume you are using the string in a loop. If not, adjust accordingly. for ii = 1:5 S = sprintf('\\\\psf\\Home\\Documen...

15年以上 前 | 2

| 採用済み

回答済み
Produce matrix with loop
_Most people_ on here will *_not_* just do a whole homework assignment for you. If you don't do any work, you will not learn. ...

15年以上 前 | 3

| 採用済み

回答済み
Get index of specific string in popup
L = strmatch('polynomial',get(ls,'string')); set(ls,'value',L)

15年以上 前 | 2

| 採用済み

回答済み
how can I create a matrix from calculated answers
Don't you think it would help if you showed us how that "this answers" was generated? It really would. . . . . . . *EDIT...

15年以上 前 | 3

| 採用済み

回答済み
Representing a number as a matrix
One approach: N = arrayfun(@str2num,sprintf('%i',146)) or (along the lines of James' answer) N = sprintf('%i',146)-'0'...

15年以上 前 | 0

回答済み
How to solve linear differential equation
Look at the help for <http://www.mathworks.com/help/techdoc/ref/ode23.html ODE45>.

15年以上 前 | 0

| 採用済み

回答済み
Sum of many inputs
function S = sumthemall(varargin) % Takes as many scalars as you want, returns the sum. S = sum([varargin{:}]); . . . ...

15年以上 前 | 4

| 採用済み

回答済み
gui callback stop problem...
Are you talking about this FOR loop: for j=0:1:400 end guidata(hObject, handles); There is nothing in the body of that ...

15年以上 前 | 0

回答済み
Displaying files using a Listbox
Is the folder of files you wish to display going to be hardcoded into the GUI, or do you wish to have the user select the folder...

15年以上 前 | 0

| 採用済み

回答済み
How do I generate a given Matrix in one command?
One line, anyway. And since the array is at least dynamically pre-allocated, the code is fast. for ii = 5:-1:1,for jj = min(...

15年以上 前 | 1

回答済み
how to continue program with fzero error
Use a TRY-CATCH block. I'll assume you are looping over the parameter set and storing the roots in a variable S. cnt = 1; ...

15年以上 前 | 1

| 採用済み

回答済み
How long have you been using matlab? tell us your story
I first saw MATLAB in 1997 (v4.?) when taking a linear algebra class to satisfy my Math major. The class used <http://www.powel...

15年以上 前 | 3

回答済み
GUI Output
What code are you using to display the sentence?

15年以上 前 | 0

回答済み
Search nx3 array row-wise for 2 equal elements
Another approach which may get you some speed if your real X array is larger than the one you show. Xs = sort(X,2); S = ...

15年以上 前 | 0

さらに読み込む