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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 3

| akzeptiert

Beantwortet
Set image aspect ratio using imshow
doc daspect

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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' )...

mehr als 8 Jahre vor | 11

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 2

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

Mehr laden