Réponse apportée
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...

plus de 15 ans il y a | 1

Réponse apportée
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 ...

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 15 ans il y a | 1

Réponse apportée
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 ...

plus de 15 ans il y a | 0

Réponse apportée
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...

plus de 15 ans il y a | 0

Réponse apportée
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...

plus de 15 ans il y a | 0

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

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
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.

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
"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...

plus de 15 ans il y a | 3

| A accepté

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

plus de 15 ans il y a | 0

Réponse apportée
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...

plus de 15 ans il y a | 1

Réponse apportée
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. ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 15 ans il y a | 1

Réponse apportée
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); ...

plus de 15 ans il y a | 1

| A accepté

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

plus de 15 ans il y a | 1

Réponse apportée
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...

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
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. ...

plus de 15 ans il y a | 3

| A accepté

Réponse apportée
Get index of specific string in popup
L = strmatch('polynomial',get(ls,'string')); set(ls,'value',L)

plus de 15 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 15 ans il y a | 3

| A accepté

Réponse apportée
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'...

plus de 15 ans il y a | 0

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

plus de 15 ans il y a | 0

| A accepté

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

plus de 15 ans il y a | 4

| A accepté

Réponse apportée
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 ...

plus de 15 ans il y a | 0

Réponse apportée
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...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
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(...

plus de 15 ans il y a | 1

Réponse apportée
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; ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 15 ans il y a | 3

Réponse apportée
GUI Output
What code are you using to display the sentence?

plus de 15 ans il y a | 0

Réponse apportée
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 = ...

plus de 15 ans il y a | 0

Charger plus