Submitted


isnetavl
Check for an internet connection by pinging one of Google's DNSes

24 days ago | 3 downloads |

Thumbnail

Answered
Does matlab have any function that can compare multiple numbers and return logical value zero or one?
Another of the many strategies: count the number of elements a unique() call gives you. (when I'm back at a computer I'll test t...

24 days ago | 0

Answered
how to plot roc curve.....
Given your data, this is the ROC curve. In general the code below is added, but that is optional. hold on, plot([0 1],[0 1]...

24 days ago | 0

| accepted

Answered
While loop - Factorial
You need to repeat the exact same code until some condition is true. The easiest way to do that is with a while loop: n=-1;%set...

25 days ago | 0

Answered
create a input dialog with text entry and also drop down menu
The easiest is probably to create a tiny GUI. More general tips can be found here, but the basic idea is something like the code...

25 days ago | 1

Answered
Is there an error in the code?
You haven't converted the number to a date yet and you had a typo in your variable name. Also, 1998/01/01 was a Thursday. Day =...

25 days ago | 0

Answered
Close a figure when a button is pressed or when a certain elapses
You can set 'close(gcbf)' as the callback of your button, and you could use a timer object to trigger a close as well.

25 days ago | 0

| accepted

Answered
How to create a GUI
Partly inspired by Adam's comment, I created a class wrapping a GUI as an answer to this question. This example contains a radio...

26 days ago | 0

Answered
Pass input data obtained from GUI to .m
I think it makes more sense to wrap this GUI in a class, so the class object remains after closing the GUI, which would allow yo...

26 days ago | 0

| accepted

Answered
How to skip text lines in a .dat file
When the automatic tools fail, it is generally the easiest to fall back to doing it yourself: Read the file as text (e.g. with ...

26 days ago | 0

Answered
Error using  '  during Transpose 3D variable from .nc file (error: "Transpose on ND array is not defined. Use PERMUTE instead.")
I suspect you don't want to interpolate, but you just want to flip the first two dimensions. In that case you can just listen to...

27 days ago | 0

| accepted

Answered
Fill box plots with different colors
It looks like g is just a sorted copy of month and x is DIC sorted by month, so why not avoid the numbered variables and use the...

28 days ago | 0

| accepted

Answered
"Undefined function for input arguments of type 'char'" but the function is designed to take chars.
Generally the errors for functions that you have written yourself will not be this descriptive, unless you make them this descpr...

1 month ago | 0

| accepted

Answered
If a variable holds a bunch of images, what does (:, :, 1, i) mean?
In the case of a 3D array, the last dimension is generally the z direction, although it can also be the different color channels...

1 month ago | 0

Answered
Add legend to multiple plots created by a for loop
There are two ways to do this. Either you need to create an array of the handles to the scatter objects and use that in your cal...

1 month ago | 0

| accepted

Answered
Help with centralling text values above a Bar Chart with side by side data
Find the x position of the bar itself and use that in your call to text. Then you can set the HorizontalAlignment to center.

2 months ago | 0

| accepted

Answered
How to apply thresholding at different parts of an image?
What you describe is a region growing algorithm, of which you can find an implementation <https://www.mathworks.com/matlabcentra...

2 months ago | 0

Answered
How to add white space to the left and right of my plot?
Use the axis function to set your axis limits, or use the xlim function to set the XLim property of your axes object.

2 months ago | 0

Answered
Is this a valid expression?
You can't index the output of the transpose function like that. You can either do it explicitly in multiple steps, or use the fu...

2 months ago | 0

| accepted

Answered
How to obtain a square matrix from a column matrix
So like this? AA=repmat(A,1,9);

2 months ago | 0

Answered
need help to plot a mesh
Use meshgrid to generate the full grid of combinations of x and alpha. Then you can use the surf function.

2 months ago | 0

Answered
question on triangulate() function
I don't see any reason why it would matter (as long as you use the same coordinate system for both inputs and the stereoParamete...

2 months ago | 0

Answered
Is it possible to print hard copy of PDF file using MATLAB
If you can manage to read the pdf in Matlab and make it your current figure, you can actually use the print function. See this p...

2 months ago | 0

Answered
How can a particular .tif file be read from a folder which is having 10 files with different suffix like 'file_1', 'file_2'...?I only want to read file_2.tif and file_4.tif.
You can generate the list of file names with dir: filelist=dir(fullfile(folder,'*_*.tif')); Now you can optionally loop throug...

2 months ago | 0

| accepted

Answered
How can I see the all results at the same time according to changing values in a "for" loop?
Store the results in an array. Don't use numbered variables, you will either have to type them out (increasing the risk of typos...

2 months ago | 0

Answered
why is my code ignoring my while loop
You shouldn't use logical arrays as your conditional. It will never do what you think it does. This is what it does: IF=@(cond)...

2 months ago | 0

Answered
import data and plat a 3D
No interpollation required, just a conversion to a 2D matrix. You can adapt the syntax of accumarray if you do have any missing ...

2 months ago | 1

Answered
Calling a function defined in a m-file from within appdesigner app, with the app object as function input
Your GUI (like all AppDesigner GUIs) has a pass-by-reference behavior (so it behaves like a handle class). That means the line y...

2 months ago | 1

| accepted

Answered
Saving/loading large images fast
I think it would be faster to load the data and recreate the figure. In general savefig only makes sense if you have a large num...

2 months ago | 0

| accepted

Load more