Answered
Change Mouse/ Cursor appearance in ginput
As far as I know you cannot set pointer type for ginput. http://www.mathworks.co.uk/matlabcentral/fileexchange/12770-myginput...

11 years ago | 0

Answered
how zero padding works?
A few ideas though I'm sure others can give a fuller more precise answer. I have done a fair bit of work with the fft, but I do...

11 years ago | 0

Answered
Creating new vector and using IF correct or loop?
Just put together a multiplication vector as e.g. multVec = zeros( size( position ) ); multVec( position < 0.5 ) = m...

11 years ago | 0

| accepted

Answered
taking mean of certain range ignorning NaN in matrix
hasNans = any( isnan(Phi), 2 ); validIdx = find( ~hasNans, 25 ); will give you the first 25 row indices which you ca...

11 years ago | 0

Answered
How to avoid NaN when comparing data
idx = isnan( A ); A(idx) = []; B(idx) = []; corrcoef(A,B); would work. I was playing around with inline i...

11 years ago | 1

| accepted

Answered
Is there a programatic check if a figure is being loaded by Guide?
I don't think there is such a function. The best I could suggest is to comment out the functionality while you are playing arou...

11 years ago | 0

Answered
Create file of different extensions of our own
filterSpec = { '*.ext1;, *.ext2', 'Ext1 or Ext2 files (*.ext1;, *.ext2)' }; uiputfile( filterSpec ) will allow you to sa...

11 years ago | 0

| accepted

Answered
How to get rid of the error: Error using horzcat. Dimensions of matrices being concatenated are not consistent.
Try transposing 'diffpcm' diffpcm = [store, diffpcm']; If you want it back as a column vector afterwards then transpose ...

11 years ago | 4

| accepted

Answered
out of memory: array too long
Depending on how much over memory it is you could try converting your data to single before you pass it to pdist. That should t...

11 years ago | 0

Answered
execute fcn by a change of a Property
Personally I would use a class to represent your data and add a listener to that class, but that would require you to read up ab...

11 years ago | 2

Answered
Button Group / make radiobutton exclusive
This is a simple example from some code I just put together. A mutually exclusive radio box with two options and the SelectionC...

11 years ago | 0

| accepted

Answered
Undefined function or variable
'uw' is defined in an if statement, but used in the else part of the same if statement where it is guaranteed not to be defined....

11 years ago | 2

| accepted

Answered
Find non zero values in a 4-D array
[x,y,z,w] = ind2sub( size(array), find( ~array ) ); will give you 4-d indices of the zero elements if that helps. All th...

11 years ago | 0

Answered
Editing a matrix to a text file
Can't you just add a space to the fprintf?: fprintf(fileID,'%d ', bw1(i,:))

11 years ago | 0

| accepted

Answered
Multiplying cell by scalar
angle = str2double( angle{1} ) * 3.14/180; will put your value in a regular double assuming that you only have 1 cell or th...

11 years ago | 1

| accepted

Answered
anonymous function can't run
You are giving two input arguments to a function that expects one. FLSE =@(f) M11(f)-M12(f)/M22(f)*M21(f); is declared t...

11 years ago | 2

| accepted

Answered
How to change color of the plot when it is called in evalin function?
Can't you just add: 'color',someColour to your evalin line in whatever is the correct syntax if you really have to use e...

11 years ago | 0

Answered
How to save Timer execution time
Can you not just use t.StopFcn to add the elapsed time to an array of timer values if you pass this array into the StopFcn?

11 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals.
If your values to be used as indices into an array are the result of some calculation, especially one which uses division, multi...

11 years ago | 0

| accepted

Answered
How can refer to rotational angle, which was made in another function of GUI?
The first code section looks like it should work fine, but you need to add guidata( hObject, handles ) at the end of the...

11 years ago | 0

| accepted

Answered
assign string to handles structure
Depending whether you pasted that code in to the question box or just typed it out there are two typos on the final line. If yo...

11 years ago | 0

| accepted

Answered
Problem over switch function
Your code works, but you have to input the element as: 'he' (with the quotation marks), not just he which Matlab...

11 years ago | 1

| accepted

Answered
can you delete path(mfiles)?
You can easily see if something is in your path by clicking "Set Path" in the 'Home' Matlab ribbon. That will answer the questi...

11 years ago | 0

Answered
Cell comparing logic output
all( cellfun( @(x,y) isequal( x, y ), cellArray1, cellArray2 ) ) should do the job I think.

11 years ago | 0

| accepted

Answered
please help, anybody explain me the meaning of following code
I don't really know what you want explaining, but it doesn't look like the code can run successfully. index=(label_vector==...

11 years ago | 0

| accepted

Answered
Matlab compiler or matlab coder?
Matlab compiler creates executables which can be run from the command line

11 years ago | 0

Answered
which version of matlab support the "database" function
There is no database function in the base Matlab, it would seem to be in the Database toolbox which would be useful to add in th...

11 years ago | 0

Answered
vertcat for a number and string
If you have R2013b or later you should probably use the dataset2table function to convert to a table then you can use table oper...

11 years ago | 0

Answered
vertcat for a number and string
[ num2cell(a); b ] should work if a and b are your two matrices and the first is a standard numeric array and the second is...

11 years ago | 0

Answered
delete zero rows only with one number
B = A( sum(A(:,2:end),2) > 0,: )

11 years ago | 0

Load more