Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

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

plus de 9 ans il y a | 1 réponse | 3

1

réponse

Réponse apportée
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...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
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.

plus de 9 ans il y a | 0

Réponse apportée
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.*; ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

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

plus de 9 ans il y a | 0

Réponse apportée
CAN WE USE fftfilt with matlab 2016b version
If you have the Signal Processing Toolbox then such a function does exist.

plus de 9 ans il y a | 0

Réponse apportée
How to update the title with variable string as time evolution
title( ha, sprintf( 't=%f', t ) ) should work

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 1

Réponse apportée
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' ...

plus de 9 ans il y a | 0

Réponse apportée
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

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 2

| A accepté

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

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

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

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
Plot Constant Voltage Curves for a dipole in a vacuum
doc linspace doc plot doc hold

plus de 9 ans il y a | 0

Réponse apportée
"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...

plus de 9 ans il y a | 0

Réponse apportée
I want to create several files with the following simulation in decreasing order from 18700 to 15000 but my simulation keeps going off after the first iteration, I don't know whats wrong. I actually did this for the the acending order and it worked.
You have to use wb=18700:-50:15000 to do a decrementing loop else it just tries to increment by 50, finds it is beyond t...

plus de 9 ans il y a | 0

Charger plus