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

14 years ago | 0

| accepted

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

14 years ago | 0

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

14 years ago | 2

| accepted

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

14 years ago | 0

| accepted

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

14 years ago | 0

| accepted

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

14 years ago | 1

| accepted

Answered
Curl in Polar Coordinates
doc cart2pol

14 years ago | 0

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

14 years ago | 0

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

14 years ago | 0

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

14 years ago | 1

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

14 years ago | 1

Answered
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)

14 years ago | 1

| accepted

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

14 years ago | 1

| accepted

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

14 years ago | 1

| accepted

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

14 years ago | 2

| accepted

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

14 years ago | 0

| accepted

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

14 years ago | 0

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

14 years ago | 0

| accepted

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

14 years ago | 0

| accepted

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

14 years ago | 5

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

14 years ago | 0

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

14 years ago | 0

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

14 years ago | 0

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

14 years ago | 0

| accepted

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

14 years ago | 0

| accepted

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

14 years ago | 0

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

14 years ago | 3

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

14 years ago | 1

| accepted

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

14 years ago | 1

| accepted

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

14 years ago | 1

Load more