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

más de 15 años hace | 1

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

más de 15 años hace | 2

| aceptada

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

más de 15 años hace | 1

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

más de 15 años hace | 0

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

más de 15 años hace | 0

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

más de 15 años hace | 0

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

más de 15 años hace | 2

| aceptada

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

más de 15 años hace | 0

| aceptada

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

más de 15 años hace | 2

| aceptada

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

más de 15 años hace | 3

| aceptada

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

más de 15 años hace | 0

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

más de 15 años hace | 1

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

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 1

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

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 1

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

más de 15 años hace | 2

| aceptada

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

más de 15 años hace | 3

| aceptada

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

más de 15 años hace | 2

| aceptada

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

más de 15 años hace | 3

| aceptada

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

más de 15 años hace | 0

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

más de 15 años hace | 0

| aceptada

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

más de 15 años hace | 4

| aceptada

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

más de 15 años hace | 0

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

más de 15 años hace | 0

| aceptada

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

más de 15 años hace | 1

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

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 3

Respondida
GUI Output
What code are you using to display the sentence?

más de 15 años hace | 0

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

más de 15 años hace | 0

Cargar más