Answered
Table Assignment using two tables of different height.
There are several ways to join tables. join innerjoin outerjoin If you get stuck, provide an example of the two tables and t...

4 years ago | 0

Answered
Size of subplots in figure is not the same
The cause of the problem is difficult to troubleshoot without having a reproducible example. Here are two workarounds. Set Po...

4 years ago | 0

| accepted

Answered
Code folding other cells shortcut
Prior to Matlab R2021b % Fold all: Ctrl + = % Unfold all: Ctrl + shift + = Starting in R2021b % Fold all: Ctrl + , % ...

4 years ago | 2

Answered
Data tip in app designer not working
The code in OP's question is copied/modified from this answer, for reference. The difference between the first and second bloc...

4 years ago | 0

| accepted

Answered
Add data tips to non-supported chart
Demo 1: Click rectangle to show datatip using ButtonDownFcn This demo is based on this answer using patches. A ButtonDownFcn i...

4 years ago | 0

Answered
Need Help Understanding a Line of Code Related to Strings
> I am trying to understand what this line of code is trying to accomplish All it is is a character vector. That's all we know...

4 years ago | 1

Answered
Unable to open file 'Diabetes.csv'.
To add to @Star Strider's advice, you can put the file anywhere you want as long as it's folder is on the Matlab path. For exa...

4 years ago | 0

Answered
How to add a variables name into a datatip
This demo consists of three 3D scatter points with labels 'a','b','c'. % Create demo data T = table({'a';'b';'c'},[1;2;3], [...

4 years ago | 0

| accepted

Answered
How to detect and separate squares and circles on image ?
This should get you started. It uses regionprops to compute the circularity of each object. I've set a subjective threshold of ...

4 years ago | 1

| accepted

Answered
How to replace the numbers in matrix?
>I'm trying to replace the zeros to the intermediate numbers I assume you mean you want to replace 0s with the value immediatly...

4 years ago | 0

Answered
How do you remove tick labels from a geoaxes object?
gx = geoaxes(); gx.LatitudeAxis.TickLabels = {}; gx.LongitudeAxis.TickLabels = {}; If you want to remove the axis labels too...

4 years ago | 0

| accepted

Answered
How to find points inside Singapore?
> Do you know places where I can find precise border for small countries like Singapore? Search the internet for shp files cont...

4 years ago | 1

Answered
How to know the equation of a curve fitted to histogram
The output of histfit is a vector of handles, one of which is a line object containing the x/y values for the curve. You could ...

4 years ago | 0

| accepted

Answered
Find max and min every n elements in a matrix, then plot with error bar together with mean value
How can i efficiently find the max and min of each group? Hint: use the same accumarray function except replace mean with max o...

5 years ago | 0

| accepted

Answered
How to find out the minimum value in a matrix between two columns in a row
Learn indexing. 10 minutes reading that page will save you hours in the future. min(a(1,[3,4]))

5 years ago | 0

| accepted

Answered
Statistical calculation from the plot function
If you have the variables app.Tempreture_In, etc..., why not use them to compute the statistics? If you only have the figures i...

5 years ago | 0

| accepted

Poll


How do you primarily find content on Matlab Central (MLC)?

5 years ago | 813 votes | 3 comments

Answered
Is there a way to Identify the calling function within a function?
Study the dbstack function. dbstack returns a structure containing information about the file, function name, and line number ...

5 years ago | 1

| accepted

Answered
How to use getrect only for axes1?
Specify the axis handle in the first input rect = getrect(ax) However, getrect is outdated. Consider using roi = drawrectangl...

5 years ago | 0

| accepted

Answered
Why am I getting the "Permission Denied" message when I try to open my diary?
Based on your screenshots, your current directory was somehow changed to the C\Windows\Sys32 folder which is likely denied writi...

5 years ago | 0

Answered
how can I change the code to save every figure my code does?
It looks like you wanted to do, AllFigH = allchild(groot); for iFig = 1:numel(AllFigH) fig = AllFigH(iFig); Folder = ('...

5 years ago | 0

| accepted

Answered
Extract position of all draw points
1. Add this to the end after the while-loop to get rid of the initial empty handle pointhandles(1) = []; 2. Extract the posit...

5 years ago | 0

| accepted

Answered
Appdesigner Gui issue code
Demo 1: Show sampling interval This simplified demo tracks the cursor position within the axes and adds a marker (.) to indicat...

5 years ago | 1

| accepted

Answered
How to project and fit a 2D path onto a 3D surface?
> I want to project a 2D spiral path on a 3D surface Inputs: (x,y) coordinates of the 2D spiral (X,Y,Z) coordinates of the 3D...

5 years ago | 1

| accepted

Answered
How to set specific color in an image as transparent?
Load image img = 'image.png'; I = imread(img); figure() tiledlayout(1,2) ax1 = nexttile(); imshow(I,'Parent',ax1) Isol...

5 years ago | 1

| accepted

Answered
How to calculate the volume and sum counts
The variable c (bad variable name) is only defined when this condition is met: if round(count/20)==count/20. Since the error in...

5 years ago | 0

| accepted

Answered
why do I receive two numbers when I use Find command?
> why do i get two indices for tg? Let's look at your data. Your code: ca = 1014 ; ci = 2050 ; cw...

5 years ago | 1

| accepted

Answered
How to find where a circle lie between which range?
Convert the (x,y) coordinates of the 5 holes to polar coordinates using [theta,rho]=cart2pol(x,y) The rho values are the radia...

5 years ago | 0

| accepted

Answered
How to check error/accuracy of K-means clustering on new dataset
> i want to check How accurate data belong to the cluster. Part 1. kmeans clustering is not a classifier... ...so the algorith...

5 years ago | 1

| accepted

Answered
Add lines to a struct
s = struct(); s.(sprintf('P%08.0f',1)) = 'Baetriz'; s.(sprintf('P%08.0f',2)) = 'Adam'; s.(sprintf('P%08.0f',3)) = 'Matlab' ...

5 years ago | 0

Load more