Answered
Read inputs from GUI into a second master script
To put the summary of all this in an answer. Think what you are doing before just always putting any or all of the following ...

8 years ago | 0

| accepted

Answered
Implicit indexing with structures - A question
You can just do it in two lines: stuff = [s.p]; result = [ stuff.x ]; (yes, I always have trouble naming random inter...

8 years ago | 1

Answered
how to horizontally concatenate two strings, being one a cell array and the other a num2str converted gpuarray?
If you define C as a cell array instead then, for example, this should work: C = { 'CELL:',',CELLA:',',CHAR:',',GCH4:',',GH...

8 years ago | 0

Answered
How to detect the changes in figure size to invoke a callback function?
The 'SizeChangedFcn' property of the figure can be used for this.

8 years ago | 3

| accepted

Answered
Set image aspect ratio using imshow
doc daspect

8 years ago | 0

| accepted

Answered
Removing rows from MyFolderInfo = dir('myfolder') before specific date
myDate = '10-Jul-2015'; myDateNum = datenum( myDate ); MyFolderInfo( [ MyFolderInfo.datenum ] < myDateNum ) = [];

8 years ago | 0

| accepted

Answered
Using slice in a fuction and from command window
Almost certainly you had a variable in your workspace called slice which hides the function. The error message gives a big hint...

8 years ago | 1

| accepted

Answered
GUIDE listbox context menu callback fails to update handles using guidata
You shouldn't really be calling a uicomponent's callback manually - it doesn't make sense. Factor out the actual functionality ...

8 years ago | 0

| accepted

Answered
date time to datenum
What is wrong with the obvious res = datenum( yourData ); ?

8 years ago | 0

| accepted

Answered
Rename images using uigetfile and cell array
Use the two output form of uigetfile: [filenames, pathname] = uigetfile({'*.jpg'}, 'MultiSelect', 'on', 'Please select the ...

8 years ago | 0

| accepted

Answered
How can I start the y axis of my plot with 1 but keep increments at 5, 10, 15 and so on?
ylim( hAxes, [1 n] ); hAxes.YTick = [ 1 hAxes.YTick ]; should achieve this, though if your plot is dynamic with a changi...

8 years ago | 0

Answered
How to address the children of an axes (GUI)?
I assume, from the callback syntax, that this is a GUIDE GUI. If so then all your GUI components are stored on the handles stru...

8 years ago | 0

| accepted

Answered
plot hold on in GUI
doc hold shows that you can call hold with an axes handle. You should always do this e.g. hold( handles.axes2, 'on' )...

8 years ago | 11

| accepted

Answered
Replace values at certain positions (positions given in an array, as well as new values)
A(B) = C; should work if B are the locations and C the values, provided they are the same length and contain valid indices ...

8 years ago | 0

| accepted

Answered
Colorbar is not representing my current colormap correctly
You have given true RGB values to scatter3 from mapping your data via the colourmap so the colourmap of the axes is still Parula...

8 years ago | 0

| accepted

Answered
Arg max without using a loop
[ rowGrid, columnGrid ] = ndgrid( 1:size(A,1), 1:size(A,2) ); idx = sub2ind( size( B ), rowGrid, columnGrid, policy ); C...

8 years ago | 0

| accepted

Answered
What's wrong with the code?
Simple use of the debugger or even just the command line would help you solve this. >> P{k}(:) ans = ...

8 years ago | 0

Answered
Does an object from a handle-inherited class compresses data?
Memory reported for handle classes tends to be totally un-useful. I don't know why, but it always shows up as 8 bytes, but that...

8 years ago | 0

| accepted

Answered
Populating popup menu based on push button? (GUI)
You are missing the guidata( hObject, handles ) line from your pushbutton callback. <https://uk.mathworks.com/help/ma...

8 years ago | 0

| accepted

Answered
I want to copy some data
a = [2 3 4; 6 2 3; 9 8 3]; b = repelem( a, 4, 1 ); If you are using R2015a or later. I haven't tested it for speed agai...

8 years ago | 2

Answered
Applying functions to each cell in a cell array
If you have multiple functions to perform a for loop would likely be simplest. The idea that for loops are very slow in Matlab ...

8 years ago | 0

Answered
How can I change the time axis unit in a spectrogram from minutes to seconds?
How are you creating the spectogram? Its axes will be whatever come from your input data, by default, but if you just create th...

8 years ago | 0

Answered
How to create a matrix, table or a cell where in odd columns variables from matrix A and in even columns variabls from matrix B will be stored?
C = reshape( [A; B], [5 48] ) will interleave columns of A and B. doesn't matter if they are numeric or cell arrays. Fo...

8 years ago | 0

Answered
How do I find the value of the cell from a particular row number
myArray{ 1, 2000 } if it is a cell array or myArray( 1, 2000 ) if it is a numeric array. Although when using a 1...

8 years ago | 0

| accepted

Answered
Saving handles in callback function of button in dialog box opened by other button in GUI
Never pass handles around yourself to a callback function that you create a function handle to. Instead pass the handle of the ...

8 years ago | 0

Answered
App Designer: How to store multiple Checkbox values as array in property variable?
app.checkboxes = [app.1CheckBox, app.2CheckBox, app.3CheckBox]; in an initalisation function should work to store the check...

8 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
Ee is just defined as a numeric scalar so I have no idea what these evaluate to, but unless it is 1 (in which case they are all ...

8 years ago | 0

Answered
How to access user input strings individually within a 'for' loop
my_str = cell(1,x); for ii=1:x my_str{ii} = input('Enter string: ', 's'); end Probably the pre-allocation is...

8 years ago | 0

| accepted

Answered
textbox in an empty figure
How do we know? You haven't shown us any code! Just store the handle when you create it, then you don't need to look for it: ...

8 years ago | 0

Answered
Does MATLAB copy large input parameters or does it operate on pointers?
Matlab takes a copy of a matrix only when you make a change to that matrix, so even though it does not use pass by reference (ex...

8 years ago | 0

| accepted

Load more