Answered
How to save the extracted features of an image in a matfile?
Well, since your question is on saving a mat file, theoretically the rest of the code and problem is not relevant and doc s...

9 years ago | 0

Answered
Good afternoon I'm trying to combine some bar graphs I have created. I tried with 'hold on' but it doesn't work, maybe because I have used the for loop.
Move fig = figure; outside the loop. You are creating a new figure within the loop, that is why they all go in differe...

9 years ago | 0

| accepted

Answered
how to do i change 1x144 matrix to 12x12?
A= reshape( A, [12 12] )

9 years ago | 1

| accepted

Answered
Why jsonencode with containers.Map doesn't preserve order of key value pairs?
I'm not quite sure where jsonencode fits in, but a containers.Map is like a lookup table, it doesn't have an order, as such. Wh...

9 years ago | 0

Answered
Hide push button in GUI using visible on/off
SS = handles.( ['push' num2str(i)] ); should work. You should use more meaningful variable names though. Your code incl...

9 years ago | 0

| accepted

Answered
How to create a mirror image of a noise signal? (create a symmetric half from the existing half)
Well, it seems you already said half of what needs to be done and categorically rejected the other half! result = flip( max...

9 years ago | 0

| accepted

Answered
How to reduce the number of unique values in a matrix?
vals = ceil( 10 * vals / max( vals(:) ) );

9 years ago | 0

Answered
How to get the RBG values from a matlab figure?
If you have the handle to your image, hImage, then hImage.CData will give you the data (if you don't then use hImage = g...

9 years ago | 0

Answered
Display error messages in message box
doc errordlg

9 years ago | 0

| accepted

Answered
Update GUI from external function
This setup should work and is the kind of thing I use: In a totally separate file, on your path, define this class: clas...

9 years ago | 1

Answered
Get image to axes in matlab GUI
doc fileread is for reading text from a file. This obviously cannot be displayed as an image. Use doc imread inst...

9 years ago | 1

Answered
Faster way than findobj to find and delete plots in a GUI interface
That output argument that you assign as: quiverEnemyVehicle = quiver3(enemy_x, enemy_y, enemy_z, enemy_u, enemy_v,enemy_w, ...

9 years ago | 2

| accepted

Answered
How to create a question that loops until it receives correct answer?
age = 0; ageans = 21; while age ~= ageans prompta = 'What age is Seán? '; age = (input(prompta))...

9 years ago | 0

| accepted

Answered
how to show index number of minimum value from matrices?
[A, idx] = min(euc,[], 2); provides the index, as shown in the documentation doc min

9 years ago | 0

Answered
How do I check that input is numerical?
str2num( inputVal ) will return the number if it is valid or empty otherwise so a if ~isempty( str2num( inputVal ) ) ...

9 years ago | 2

| accepted

Answered
Finding the indices of duplicate values in one array
[~, uniqueIdx] = unique( A ); duplicateLocations = ismember( A, find( A( setdiff( 1:numel(A), uniqueIdx ) ) ) ); then ...

9 years ago | 2

Answered
I am getting an error saying Index exceeds matrix dimensions. Error in recurse_subfolders (line 36) baseFileNames = dir(filePattern);
Your code is badly formatted, but if you are getting the 'Index exceeds matrix dimensions' error on this line: baseFileName...

9 years ago | 0

Answered
How do I load a .mat file into a function when the file is named as a number string which is represented by a variable in the workspace from a previous process?
load( fullfile( ref, '.mat' ); or some variation of that if you want to load specific variables or assign the output to a s...

9 years ago | 0

Answered
Warning: Colon operands cannot be logical
It is pretty much exactly as the error says. im is binary therefore min( im(:) ) is also binary. Wrap it up in e.g. dou...

9 years ago | 1

Answered
How to pre-select item in the listbox in the Matlab UI
Set the 'Value' for the listbox to 1 at the point when it is populated.

9 years ago | 0

| accepted

Answered
Increase nonzero values without deleting zeros
X = ( X ~= 0 ) .* ( X + 10 );

9 years ago | 2

Answered
can i call app designer CallBack Functions outside the app ?
Yes, it is possible, but you need to understand the basics of function scope. a=myapp a.buttonpushedcallback(a) would...

9 years ago | 0

Answered
uistack on opening function
figure( hFirstGUI ); should work if placed in the *Output_Fcn* of the 2nd GUI, should work I think. 'hFirstGUI' being the ...

9 years ago | 0

| accepted

Answered
getting a 90 x 90 matrix
If you don't care which 90 by 90 elements then outputMatrix(1:90,1:90) will do this. As will outputMatrix(101:190,...

9 years ago | 0

Answered
Operands to the || and && operators must be convertible to logical scalar values?
You need to use & to compare arrays of logicals. The fact you are wrapping the comparison in an 'all' test clearly suggests y...

9 years ago | 0

| accepted

Answered
Find an element in a matrix
[cols, rows] = find( A' == 1 )

9 years ago | 2

Answered
How to use switch to choose and operator within a function?
case(op=='+') is not valid. Use case('+') instead

9 years ago | 0

Answered
How can I get rid of Title and x-label parts by default?
Use doc fplot instead. It has neither of these by default and is recommended by the help to use instead of ezplot (at l...

9 years ago | 0

Answered
Call a function in an m-file from a method of a handle class
If you don't pass the object in then it has to be a static function and has knowledge of the class only, not the specific object...

9 years ago | 0

Load more