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

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

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

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

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

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

9 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.*; ...

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

9 years ago | 0

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

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

9 years ago | 0

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

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

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

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

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

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

9 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' ...

9 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

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

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

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

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

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

9 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; ...

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

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

9 years ago | 1

| accepted

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

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

9 years ago | 0

Answered
How to plot data from different files in same plot/figure
doc plot The first argument to plot can be an axes handle. Always use this e.g. hFig = figure; hAxes = axes( hFig );...

9 years ago | 0

Load more