Answered
How to run a routine sequence in app designer app?
You can use a timer to run a callback function at a periodic interval.

8 months ago | 1

Answered
I am trying to detect if a GUI created from AppDesigner is open
You said: "My take was to set up a wait loop checking that the GUI is still open and when its closed the loop will continue. Is ...

8 months ago | 0

Answered
How To Get Data From ValueChangedFcn in an Uidatepicker?
When you create a uidatepicker the object is created immediately, and the next line of code continues to run. It does not wait f...

8 months ago | 0

| accepted

Answered
Data tip when using two y-Axes
You can add anything you want to the data tips by modifying the DataTipTemplate. It is a bit tricky to do with images, because ...

8 months ago | 0

| accepted

Answered
Plot two x-axis in a graph with Time(calendar month/year) on axis and Hour on another x-axis
I'm having some trouble interpretting your data. I'm not sure I understood completely how the dates align with the times. For e...

9 months ago | 0

| accepted

Answered
Use timetable as x axis in heatmap
In this case, you may be better off with something like imagesc or surf instead of heatmap. heatmap is designed for cases in whi...

9 months ago | 0

Answered
Automatic creation of empty file
I've made this mistake many times. Fortunately, the fix is easy. 1. Press the "Preferences" button in the "Environment" section...

9 months ago | 2

Answered
Making a Surface plot transparent
Your surface plots are each roughly 7500x7500 faces, and most (all) monitors have a resolution that is much lower than that. Thi...

9 months ago | 0

| accepted

Answered
How to correct the invalid expression error when i have the correct delimiters and multiplication operator?
This is an invalid MATLAB expression: (t>=0)f(t<1) Specifically, this is invalid: (t>=0)f It is unclear what you intend for ...

10 months ago | 0

Answered
Why am i getting "Undefined function 'eq' for input arguments of type 'cell'." error?
Are you trying to check the currently selected value, or the list of available values? The ItemsData stores the list of availabl...

10 months ago | 0

| accepted

Answered
How do I make an app that opens another app that displays the current date and time
When you say "app", are you talking about App Designer? Regardless, most apps (either programmatic or created with App Designer...

10 months ago | 0

Answered
Determine the (pixel) width of a string
The only way I know of to do that in MATLAB is using the Extent property on text objects. The third element is the width, the fo...

10 months ago | 0

| accepted

Answered
name value pairs with variable input arguments
The problem is: ~ischar(varargin(1:2:nargin)) The varargin input will always be a cell-array, so this condition will never be ...

10 months ago | 0

Answered
How to create a %of time vs %of area plot
There are a lot of missing details from your question that would need to be filled-in before someone can provide a good answer. ...

10 months ago | 0

| accepted

Answered
Make a 3D plot over a circle
There are tons of options for doing this in MATLAB. Here are a few: % First define some constants and your input data (as I und...

11 months ago | 1

| accepted

Answered
Break while loop app designer
Consider this example (you should be able to use this same pattern within App Designer with only a little tweaking): function s...

11 months ago | 0

Answered
TabGroup: How to execute code before selection changed?
I'm curious, why do you need the code to run before switching tabs? I don't believe this is possible without basically implemen...

11 months ago | 0

| accepted

Answered
Workflow Matlab with Git
Welcome to the world of version control. Git is an amazing and powerful tool, but it can take some getting used to. I would sug...

11 months ago | 1

| accepted

Answered
Brushing when plotting a 2D Matrix with linkdata: brushes whole row of matrix instead of single data points.
The reason for the behavior you are seeing is because when you enable data linking (via linkdata) and then select data points, y...

11 months ago | 0

Answered
i have a loop that generates an image everytime how can I save the figures?
I can't see any obvious bugs in your code. As written, it should save a copy of all figures that you opened in your loop. Are yo...

11 months ago | 1

Answered
Issues with CurrentPoint in R2021b
We've seen issues in the past with CurrentPoint being slightly off, and we are investigating them. Can you provide a little more...

12 months ago | 1

Answered
calling subfunctions with handle
You can call a function from a function handle by appending parentheses to the end of the variable name, even if there are no in...

12 months ago | 1

Answered
Generate an indexed image
Are you trying to create an indexed image in MATLAB? Or are you asking what programs (aside from MATLAB) can be used to create i...

1 year ago | 0

Answered
Can I index a matrix on the same line it's created?
When I first read your question, I assumed this was not an acceptable answer: clc, clear all; coordinates = [6,2;-4,8;-5,-1;3,-...

1 year ago | 1

| accepted

Answered
Wait until user press return key to continue script
Another option is to use waitfor along with a WindowKeyPressFcn. x = rand(1,41); y = 1:41; H(1)= plot(x,y,'r.'); H(2)= line(...

1 year ago | 1

| accepted

Answered
Wait until user press return key to continue script
One option is to add a WindowKeyPressFcn that runs the rest of your code. Something like this: x = rand(1,41); y = 1:41; H(1)...

1 year ago | 1

Answered
I have a contourf function constituted by x, y and z vectors (It is a large matrix). Then, I would like to find the x, y and z values corresponding to certain x and y vectors.
I'm not sure I completely understand your question, but I think you are misusing meshgrid in your code example above. Does this...

1 year ago | 0

| accepted

Answered
Adjusting figure size (2019b)
On axes the OuterPosition and InnerPosition (which is equivalent to Position) are linked to one another. The difference between ...

1 year ago | 1

Answered
how can I custom a mask matrix by giving black color to values equal 1 and transparency to NaN values?
I'm not 100% sure what you are asking, but if I understand your question correctly I don't think what you are asking can be done...

1 year ago | 0

| accepted

Answered
Histogram with two axes
If I understand correctly, you want two y-axes: one with the real numbers and another with relative values. There is no built-i...

1 year ago | 0

| accepted

Load more