Respondida
How Can I create exe file of GUI program (.fig, .m)
For the second question, no, you create an exe for your top level function and it will bring in all the dependencies it needs (t...

más de 7 años hace | 0

Respondida
How to calculate standard deviation and mean ?
Use S = std( a, 'omitnan' ) M = mean( a, 'omitnan' ) if you don't want NaNs in your statistic

más de 7 años hace | 1

Respondida
How to remove callback from a java component?
Ok, I understand the problem now. I'll leave my previous answer in since it was related to the question in the title, even thou...

más de 7 años hace | 0

| aceptada

Respondida
How do you save parameters for a stereo camera
doc save As the help and error says, you need to pass a string with the variable name in: save( StereoCalFileName, 'Va...

más de 7 años hace | 0

Respondida
How to remove callback from a java component?
set(handles.jsh,'StateChangedCallback',[]) seems to work fine for me when I tested it out on a java slider, using square bra...

más de 7 años hace | 0

Respondida
Find smallest imaginary values of a vector of real and complex number
Something like this would do it, albeit with some better variable naming and handling of error cases. [~, idx] = sort( nonz...

más de 7 años hace | 1

| aceptada

Respondida
How to find the x&y co-ordinates of the highest peak and storing the data into a variable
If you just want the highest peak can't you just use doc max ? with the 2 output syntax to get the index which you can t...

más de 7 años hace | 1

| aceptada

Respondida
UISTACK doesn't recognize handle
hImage = imagesc(output_image); % Plot image uistack( hImage, 'bottom'); You need to keep the graphics handle output of ...

más de 7 años hace | 1

| aceptada

Respondida
Difference between two iteration of for loop
diff( P ) after the for loop should do this for you for all pairs of consecutive elements of P

más de 7 años hace | 0

| aceptada

Respondida
Find the longest sequence of consecutive non-zero values in a vector
<https://uk.mathworks.com/matlabcentral/fileexchange/41813-runlength> or other similar run length functions should help, espe...

casi 8 años hace | 0

Respondida
insert a Background without guide
f=figure('Position',get(0,'screensize')); as=axes('Parent',f,'Units', 'pixels', 'Position',[400 200 200 150]); i...

casi 8 años hace | 0

| aceptada

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Hopefully this is still work in progress, but the options for asking a question are a little odd at the moment. I notice that '...

casi 8 años hace | 2

Respondida
[DEPRECATED] What frustrates you about MATLAB?
A minor irritation, but still a bit annoying. Matlab's editor is obviously very lacking when it comes to refactoring tools and ...

casi 8 años hace | 0

Respondida
Changing the x,y axis values
Set the XData (and YData if required) properties of your image, either when first creating it as e.g. image( hAxes, 1:360, ...

casi 8 años hace | 0

| aceptada

Respondida
GUI: how to make radio button with multiple lines
Use html for the 'String', e.g. '<html>This is a multiline<br>string</html>'

casi 8 años hace | 2

| aceptada

Respondida
Problem with error "Subscript indices must either be real positive integers or logicals"
Use Y = y( round( Ty ) ); to ensure they are actually integers. at least one of them must have decimal values, however ...

casi 8 años hace | 0

| aceptada

Respondida
Why my plot does not appears in axes in GUI
Whenever you issue any plotting instruction you should always give the axes explicitly to avoid this kind of unexpected occurren...

casi 8 años hace | 0

Respondida
How to set X axis limit as 10 to power 1 up to 10 to power 5
set( hAxes, 'XScale', 'log' ) will give you the logarithmic axes scale which you can combine with XLim. I can't remember o...

casi 8 años hace | 0

| aceptada

Pregunta


Freezing a plot while updating data
Does anyone know if there is an option that is essentially the opposite of drawnow that I can use to tell my plot not to draw un...

casi 8 años hace | 1 respuesta | 0

1

respuesta

Respondida
How to convert a 2D matrix to a 3D matrix without for cycles?
M3 = permute( reshape( M2', N, J, K ), [1 3 2] ); should do it I think, though there may be neater ways!

casi 8 años hace | 0

Respondida
Changing colors using imagesc
Create your own colourmap, e.g data = round( 2 * ( rand(20) - 0.5 ) ); figure; hAxes = gca; imagesc( hAxes, data ); ...

casi 8 años hace | 1

| aceptada

Respondida
Passing predefined variables into matlab's fit function
Use anonymous functions, e.g. f = @(x,y) x + y; g = @(y) f(4,y); turns f, a function of 2 variables into g, a functio...

casi 8 años hace | 2

Respondida
How do I add ActionPostCallback to GUI axes
Both zoom and pan should take a figure handle, which, by default, will be handles.figure1 in a callback (or in the Openi...

casi 8 años hace | 0

Respondida
Reference to non-existent field 'v'.
I assume you mean p.v_lq rather than p.v.lq

alrededor de 8 años hace | 0

Respondida
How to exit a script but not from MATLAB?
doc return should do the job.

alrededor de 8 años hace | 0

Respondida
Adjusting bar colours in plot
Try editing the 'ColorOrder' property of your axes to define 13 colours rather than the default 7 before you do the plotting. H...

alrededor de 8 años hace | 1

Respondida
Can anyone help with vertcat?
vx=linspace(-10,10,1000); returns an array with 1 row and 1000 columns. You would need to use V=[vx';1;2]; to ad...

alrededor de 8 años hace | 0

Respondida
Not Enough Input Arguments in ODE Solver
You only call the function with 11 input arguments, the function definition takes 12, which in itself is far too many in general...

alrededor de 8 años hace | 0

Respondida
How to pass a variable to a function in GUI?
<https://uk.mathworks.com/help/matlab/creating_guis/share-data-among-callbacks.html> Personally I use guidata if I am creatin...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to pass an argument for a function when it is an argument in another function?
If r is definied beforehand you can create a function handle that turns your 2-argument function into a 1-argument function e.g....

alrededor de 8 años hace | 0

| aceptada

Cargar más