Respondida
Error: Inner matrix dimensions must agree.
<http://www.mathworks.com/matlabcentral/answers/2210-error-correction-inner-matrix-dimensions-must-be-same-how-to-correct Error ...

casi 15 años hace | 0

| aceptada

Respondida
Left digits
n=num2str(1234) n1=str2num(n(1:end-1))

casi 15 años hace | 0

Respondida
How do I make an if, elseif, else statement?
The correct way to do the conditions is this: if 0<x & x<10 y=4*x elseif 10<x & x<40 y=10*x else ...

casi 15 años hace | 2

| aceptada

Respondida
Help with execution-programs
<http://www.mathworks.com/products/demos/compiler/deploytool/index.html Maybe this will help you>

casi 15 años hace | 0

| aceptada

Respondida
Selecting part of a string
surely not the best way to do it but here is my way v=['a.txt' 'b.txt' 'c.txt' 'd.txt'] cell2mat(arrayfun(@(x)strtok(x,'.tx...

casi 15 años hace | 0

| aceptada

Respondida
Karhunen-Loeve Transform
You can get some examples on the <http://www.mathworks.com/matlabcentral/fileexchange/ FEX>, just search for them or other ways ...

casi 15 años hace | 1

| aceptada

Respondida
Curl in Polar Coordinates
doc cart2pol

casi 15 años hace | 0

Respondida
Calling a variable from a variable
assignin('base',char(V(2)),3000)

casi 15 años hace | 0

Respondida
GUI handles problem... throughout code it vanishes!?
When you do handles.LAIi=LAIi; you must also update the handles structure guidata(hObject, handles);

casi 15 años hace | 0

Respondida
Making a NxN matrix.
We don't make homeworks, we only help with answers to specific questions and if we are kind enough we might give some tips: d...

casi 15 años hace | 1

Respondida
Changing the atan function so that it ranges from 0 to 2*pi
The <http://en.wikipedia.org/wiki/Atan2 Wikipedia> got all explained, you just need to do the code, it's very simple. functio...

casi 15 años hace | 1

Respondida
trying to accounting the number of zeros in random script
a=randint(1000,1); numel(a(a==0)) or sum(a==0) or numel(a)-nnz(a)

casi 15 años hace | 1

| aceptada

Respondida
Other uses of the unique function
unique(a,'rows')

casi 15 años hace | 1

| aceptada

Respondida
putting a text in a white space on a plot
What you are asking for isn't easy to implement but can be done, what the code has to do is the search for one empty space big e...

casi 15 años hace | 1

| aceptada

Respondida
put a space in a text
s=['this is ' num2str(1) ' my cat'] strcat ignores trailing ASCII white space characters and omits all such characters from t...

casi 15 años hace | 2

| aceptada

Respondida
Finding If a sub-array (1d) is there in a 2d array
For the example provided array2D = [1 2 3; 4 5 6; 6 7 8] v1= [4 5 6] [tf,loc]=intersect(array2D,v1,'rows') loc gi...

casi 15 años hace | 0

| aceptada

Respondida
get the name of variable
No variable was assigned to x, the code x=myData; just copies the contents of the variable myData to the variable x, you are the...

casi 15 años hace | 0

Respondida
How can comet3 be modified to have a disappearing tail?
edit comet3 change all the erasemodes to background, it's in the line functions, example: 'erase','none' -> 'erase','ba...

casi 15 años hace | 0

| aceptada

Respondida
set and get on two gui
The error is in the line: mainGUIhandle = main; In that context MATLAB doesn't know what the variable main is because i...

casi 15 años hace | 0

| aceptada

Respondida
strcat including space (i.e, ' ')
c=[a ' ' b] strcat ignores trailing ASCII white space characters and omits all such characters from the output. White space c...

casi 15 años hace | 5

Respondida
Automated concatenation of variables into matrix then separation of matrix into variables containing original variable names
%without any verification of the format of all variables a=[1 2 3] b=[4 5 6] lvar=who; c=cell2mat(cellfun(@eval,lv...

casi 15 años hace | 0

Respondida
command doesn't work from inside a loop in a script but works fine in the command window
Do you have one m file or function called z.m? having one can cause the error: _Undefined function or method 'z' for input ar...

casi 15 años hace | 0

Respondida
Creating simulink block and hidding the code
http://www.mathworks.de/matlabcentral/answers/552-protecting-a-simulink-block-with-a-password

casi 15 años hace | 0

Respondida
save
save(['C:\' s],s) %save the mat file with the same name as the variable

casi 15 años hace | 0

| aceptada

Respondida
naming variables
s='myData' Var1=[1 2 3] assignin('base',s,Var1)

casi 15 años hace | 0

| aceptada

Respondida
Save
To save all the variables that are inside the function to the file MyFunVariables.mat in the current directory do this save('...

casi 15 años hace | 0

Respondida
What is your unusual use of MATLAB?
I used MATLAB to see how bad was the damage on my phone touch screen and to minimize the error, got the alignment values from th...

casi 15 años hace | 3

Respondida
Why do I receive an error when I run this code?
Bad use of the poly2sym function, you give a string for the first argument but the function expects one array. Also the z shoul...

casi 15 años hace | 1

| aceptada

Respondida
How can I convert num and den to strings?
nums=num2str(num{:}); dens=num2str(den{:});

casi 15 años hace | 1

| aceptada

Respondida
what's the time of pause(1)
*pause(n) pauses execution for n seconds before continuing*, where n can be any nonnegative real number. The resolution of the c...

casi 15 años hace | 1

Cargar más