Answered
Undefined function or variable 'case1' each time I start Matab and run the file
In the 'Set Path' dialog from the top ribbon there is a 'Save' option which should save for future sessions. I don't really und...

10 years ago | 0

Answered
I want to use popup menu variables in the push button function
<https://uk.mathworks.com/help/matlab/creating_guis/share-data-among-callbacks.html> Personally I always use the approach of ...

10 years ago | 0

Answered
Mean values of cell arrays
You should be able to use cell2mat to convert to a normal numeric array if your cell contents are always all the same size as ea...

10 years ago | 0

Answered
assigning output of a for loop to an array
W(Ri) = error_calculation (Ri,Rt,Rm,E); will put the values into an array, assuming the output of error_calculation is a sc...

10 years ago | 0

| accepted

Question


What is the difference between ishghandle and isgraphics?
This is something that I have wondered for a while. I like to do a lot of validating of things in my code, one of which is to c...

10 years ago | 1 answer | 3

1

answer

Answered
How to transfer data from one GUI to a uitable of another GUI
There are a few different methods. This is a very very rough sketch of the setup I use. I have answered a few questions simila...

10 years ago | 1

| accepted

Answered
how do i explain which eigenvector the software reports as there are theoretically an infinite number?
doc eig doc eigs will both return normalised eigenvectors, depending on your input arguments.

10 years ago | 0

Answered
How to find the name of a file from a folder?
If you just mean you want to strip out hidden files then there are probably numerous ways to do it, e.g. import java.io.*; ...

10 years ago | 0

Answered
I'm getting an error in the line with product (count)= A*B/C
It means that size( product(count) ) does not evaluate to the same thing as size( A*B/C ) so trying to assign t...

10 years ago | 0

Answered
Returning error messages if input criteria not met
validateattributes( i, { 'double', 'single' }, { 'row', '>', 1, '<', 9 } ) validateattributes( j, { 'double', 'single' }, {...

10 years ago | 0

Answered
CAN WE USE fftfilt with matlab 2016b version
If you have the Signal Processing Toolbox then such a function does exist.

10 years ago | 0

Answered
How to update the title with variable string as time evolution
title( ha, sprintf( 't=%f', t ) ) should work

10 years ago | 1

| accepted

Answered
RGB to Lab color space
Just using lab = rgb2lab(rgb); seems to give results in the expected output range. I'm not sure what all the extra work...

10 years ago | 0

| accepted

Answered
how to generate random integers without using built-in functions?
doc rand doc randi Neither of these are on the list of functions you are not allowed to use and either one of them can b...

10 years ago | 0

| accepted

Answered
How to remedy the error for accessing an Index, but the index is out of bounds?
You created your object to have size num_period, then you loop around from j = 1:num_period, but you use j+1 to index into your ...

10 years ago | 0

Answered
Using colorbar with imagesc
Do you need white to actually appear on the colourbar? Doing this can be difficult because colorbars are usually e.g. 256 or 51...

10 years ago | 0

| accepted

Answered
How do I store the return value of a function?
doc containers.Map can be used for caching of non-contiguous results with non-integer lookups. Whether it is worth the cos...

10 years ago | 1

Answered
Statistical comparaison of 2 matrices 1D.
It would help if you give an example of your matrices. If all you care about is qualitatively, 'high' values matching 'high' ...

10 years ago | 0

Answered
Error using image Error using image TrueColor - How to plot images created by joining arrays instead of using imread
image( uint8( dot ) ) should work, although just doing what you put works for me too in R2016b

10 years ago | 1

| accepted

Answered
Don't understand indexing statement from compiler
sum( ... )( ... ) is not valid syntax in Matlab. You can't chain together parenthesis is what that error is essentially ...

10 years ago | 0

Answered
Add text to string in for-loop
You need to concatenate( in the else as you currently have it): str = [str sprintf(' + X(%04d) ',i)]; Why do you have th...

10 years ago | 2

| accepted

Answered
cropping the matrix size
Yes, just use colon notation doc colon e.g. myMatrix = myMatrix( 1:26, :, : ) but obviously it depends what ...

10 years ago | 0

| accepted

Answered
Problem displaying an image on an axis
Always give an explicit axes handle to plotting instructions. Almost all plotting instructions (certainly in base Matlab) allow...

10 years ago | 0

Answered
Moving license to new computer
<http://uk.mathworks.com/matlabcentral/answers/99859-how-can-i-deactivate-matlab-on-a-machine-i-cannot-access> Then just acti...

10 years ago | 0

Answered
While and If loop with stopping criteria
iter = 1; while( Error > Tol ) ... out{iter} = PSO_EBW_SD(problem, params); ... iter = iter + 1; ...

10 years ago | 0

| accepted

Answered
Which toolbox do I need to use functions 'banded' and 'diagonal'?
These don't appear to be part of any toolbox. If you have a sufficiently recent version of Matlab (not sure when this functiona...

10 years ago | 0

| accepted

Answered
How to multiply a vector 3 times to get a 3 dimentional matrix
B * B' .* reshape( B, [1 1 3] ); if B starts as a column matrix. In your case above B * B' would in itself result in a sca...

10 years ago | 1

| accepted

Answered
Plot Constant Voltage Curves for a dipole in a vacuum
doc linspace doc plot doc hold

10 years ago | 0

Answered
"no callback property on the ToggleButton class"?
Judging by the help, and also your code, uitogglebuttons are for use within a buttongroup only where you need to define a Select...

10 years ago | 0

Load more