Réponse apportée
What am I not seeing here
You are seeing the print out of length(a) then disp(i). I am thinking that this is a bug, or the parser is *_supposed_* to be s...

presque 15 ans il y a | 2

Réponse apportée
merging two matrix into a single one
J = [1 2 3;0 0 0;0 0 0]; K = [0 0 0;0 0 0;4 1 7]; L = max(J,K)

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Include variables in matlab user input
Is this what you are after? a = input('Pick a letter: ','s'); b = input(['Now ask something about the letter ', a, '? '],'s...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Round to shortest integer
x = 14464000000000000; % An initial value x = min(x,32768) % Limit the value to 32768 I am not clear on what you mean by,...

presque 15 ans il y a | 0

Réponse apportée
Creating my own error within a program
Is your program a function? If so, then it doesn't matter what variable names the user passes, because your function will have ...

presque 15 ans il y a | 0

Réponse apportée
Help with basic MATLAB syntax
sin(cos(eln25))+100*(55/7-1000*tan(.23)) Assuming eln25 is a variable with numerical value, or a function which returns a num...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Return control form a function to the main program
Define default output variables before the return statement. function x = myx(A) if A/2 > 7 x = []; re...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Matlab is confused between line (function) and line (variable)
In addition to Jan's sage advice, you misplaced an apostrophe: OutputChannels = 1; line = [5 21]; Nameyout=[repmat('R...

presque 15 ans il y a | 1

Réponse apportée
Basic question: how to find range of index values
mydata = [1 1 2 3 4 5 6 1 4 4 4 4 4 4 4 1 45 67 8 9 4 4 4 4 4 1 36 2 4 4 4 3 1 1 18 98 99]; findstr(mydata,4*ones(1,7)) Th...

presque 15 ans il y a | 3

Réponse apportée
compare string
If you want to compare the name of the file, use the result returned from UIGETFILE. Of course if this will be used later, you ...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Orientation of ellipsoid
See the help for the <http://www.mathworks.com/help/techdoc/ref/rotate.html ROTATE> function. For example: [x, y, z] = ellip...

presque 15 ans il y a | 2

| A accepté

Réponse apportée
Calling a variable from a variable
I don't understand why you would want to do this, but here is a way to automate it. clear all % Fresh start... a = [1...

presque 15 ans il y a | 0

Réponse apportée
GUI handles problem... throughout code it vanishes!?
GUIDATA does not update the handles structure, but stores the handles structure in the figure's applicationdata. The handles st...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
GUI edit text and msgbox problem .. what do I miss
This works: input = get(handles.koefm,'String'); %get the input from the edit text field % No need to convert to number....

presque 15 ans il y a | 0

| A accepté

Réponse apportée
need a help...simple question
Yes you can do this. Any M-file can call any other M-file as long as they are in the same directory or on the path. For exampl...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Please need help to detect the error in my code...
The error is that you are indexing into the array U with 0. There may be logical errors involved as well. You have nested loop...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
simple MATLAB question ...
MATLAB indexing starts at 1, not 0. n = 5; U = zeros(n); % Pre-allocate the memory. for a = 1:n for b = 1:...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
??? Subscripted assignment between dissimilar structures.
It sounds like you are running a script instead of a function? If so, my guess is that with a clear workspace your code creates...

presque 15 ans il y a | 0

Réponse apportée
How do I start running timer?
Use the <http://www.mathworks.com/help/matlab/ref/start.html START> function. I recommend you read the linked doc and look at o...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
In Line
If you open the file in wordpad, you should see it vertical. To make it look vertical in notepad, use: %d\r\n as the form...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Assigning each column of a matrix to a cell
As an example: A = round(rand(6,3)*20) B = round(rand(6,3)*-20) C{1} = mat2cell(A,size(A,1),ones(1,size(A,2))); C{2} = ...

presque 15 ans il y a | 2

| A accepté

Réponse apportée
Two colormaps on one colorbar: one colormap covering all z data and the other covering a key region
Here is an example: % Start by making the colormap CM = bone(1000); CM(200:300,:) = jet(101); colormap(CM) % Set ...

presque 15 ans il y a | 2

| A accepté

Réponse apportée
Trouble passing guidata to new .m files
In order to use GUIDATA, you need the handle of the GUI. So to get the guidata of a figure with handle H, GD = guidata(H); ...

presque 15 ans il y a | 0

Réponse apportée
Set x-axis limits using xlim AND autoscale y-axis
Calling: axis tight Does reset the axes limits to the range of the data, as documented. So why is it that you are calling t...

presque 15 ans il y a | 0

Réponse apportée
Search for sound clip within larger sound clip
Here is an example: % Load three sound clips. y = load('train'); y2 = load('gong'); y3 = load('handel'); % Make a new...

presque 15 ans il y a | 0

Réponse apportée
How to separate specific data from a larger data set
If your array is called A, then: B = A(:,A(9,:)==3); % Take columns of A which have a 3 in row 9.

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Error: Inner matrix dimensions must agree.
omega1 is 1x20 t is 1x1001 How do you recommend to multiply them?? You could use this: u10 = a0 + sum(bsxfun(@times,ak...

presque 15 ans il y a | 0

Réponse apportée
Finding integers in an array.
V = [nan;nan;9;nan;6;7;nan;9] % An example to work with... idx = find(V==V,1); % Location. nan never equals nan... val ...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
How could I cut a matrix into subgroups?
A = round(rand(10,4)); B = mat2cell(A,[2 3 4 1],[2 2])

presque 15 ans il y a | 0

Réponse apportée
Putting commas and colons
x = rand(3,3,3,3,3,3,3,3); Y = repmat({':'},1,7); x(Y{:},2)

presque 15 ans il y a | 0

| A accepté

Charger plus