Answered
Close a waitbar of a GUI from a function
The break command terminates execution of a while-loop or a for-loop. In nested loops, break exits only from the loop in which i...

6 years ago | 1

| accepted

Answered
how to stop continuous pop up of figures
The figures are being created somehwere in the file or from a function being called from within the file. You'll need to make c...

6 years ago | 1

Answered
Loading a text file with strings and numbers
"The only number is “1.5”..." I see a 2 in there, too. "I need the code to store each item as a separate variable." That w...

6 years ago | 0

Answered
How should I use the function Circfit ?
From the help section of that file, % x,y are column vector where (x(i),y(i)) is a measured point Their class are double. ...

6 years ago | 1

| accepted

Answered
Rotate vector in row
Simpler n= [1,19,15,18,21,10,16,2,7,3,17,6,1; 1,14,20,8,4,13,9,5,1,0,0,0,0; 1,11,12,1,0,0,0,0,0,0,0,0,0]; % rand...

6 years ago | 0

Answered
Speeding up a for loop
Idea 1 This single line does the same thing as the 2nd block of your code. Sum2 = sum(arrayfun(@(i)sum(C(i,:) .* (abs(A(i,:)...

6 years ago | 0

Answered
restricting vector size input
See the inline comments for the 3 changes I made to your code. I'm assuming that the user is providing a vector of numbers as ...

6 years ago | 1

| accepted

Answered
Too many input arguments.
Understand the input options In your version of Matlab (r2018b) as well as in the current release (r2019b), there are multiple ...

6 years ago | 0

| accepted

Answered
Scatter plot with two data sets of uneven values
Here's a demo you can follow. It produces 2 datasets per your description; then it pairs the y values from dataset1 to dataset...

6 years ago | 0

| accepted

Answered
how to specify time in x-axis?
linkaxes(ax,dimension)

6 years ago | 0

| accepted

Answered
how to rearrange cell array with the grouped sequence
C is your input array as I've understood it; D is the output matrix. % Produce input array C = {21 3 '1' 31 2 '1 1' ...

6 years ago | 0

| accepted

Answered
bwdistgeodesic with Euclidean distance as metric
According to Steve Eddins's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the sh...

6 years ago | 0

Answered
How to simplify code which reads multiple files
You can initially list all files with a given extension and then eliminate any files that do not contain one of the strings list...

6 years ago | 0

Answered
Linear Fit of data with uncertainty
There seems to be some confusion about the interpretation of observation weights. "If I were to multiply my weights by any fac...

6 years ago | 0

Answered
How to view parameter values while debugging in App Designer?
Here are several methods of seeing the values of variables in AppDesigner code. Set up debug mode Place a break point anywher...

6 years ago | 4

| accepted

Answered
Changing variable name from input string
For visibility, I've summarized my comments here as an answer. This demo asks the user for a variable name and stores the vari...

6 years ago | 1

Answered
How to create a legend from a cell array?
How's this work for you? plot(magic(5)) C = {1;2;3}; p = cellfun(@(x){num2str(x)},C) legend(p{:},'real data','real data 2' ...

6 years ago | 0

| accepted

Answered
Matrix dimension must agree
In this line yd = (((xd-xd1)./(xd2-xd1)).*(yd2-yd1))+(yd1); % ^^ The terms to the left and right of...

6 years ago | 0

| accepted

Answered
Replacing values in matrix that are greater than another matrix
% Create demo matrices, must be equal size A = randi(4,5,4); B = randi(6,5,4); C = B; C(A<B) = A(A<B) ;

6 years ago | 0

| accepted

Answered
how can I move the legend in uiaxes?
"The positioning of the Legend is driving me crazy" Here are two options. Set legend location/position from within your code ...

6 years ago | 1

| accepted

Answered
Finding wilkinson notation parser in backend for fitlm Matlab R2015a
After some digging, let's see if this works for you. The Statistics and Machine Learning Toolbox has a function D = x2fx(X,mo...

6 years ago | 1

| accepted

Answered
How can I add colors on my 3D scatter plot ?
Specify color from scatter3() You can specify the color of each point when you call scatter3(X,Y,Z,S,C) or by using the proper...

6 years ago | 0

| accepted

Answered
Troubles assigning colorbar values in a bivariate histogram plot
Scatter plot approach "i also tried with sccater3 but i have to group my data in bins so this option doesnt work." What's wron...

6 years ago | 0

Answered
Troubles assigning colorbar values in a bivariate histogram plot
Binned approach The problems with using the binned bivariate histogram are The colors on the histrogram will be based on densi...

6 years ago | 0

| accepted

Answered
Display positive and negative values Groups of Stacked Bars
The reason a 2nd figure is appearing is because it is generated within the plotBarStackGroups.m function which is a bad idea. ...

6 years ago | 0

| accepted

Answered
Error in Joining multiple date time duration id date is in cell Array
In Test2, the table is not being read in correctly. The image below is the result of line 36 in get_vmlog.m. As you can see, t...

6 years ago | 1

| accepted

Answered
legend properties of columnlegend
The problem The file exchange function columnlegend() (started in 04/2010, last updated 09/2016) calls legend() with multiple o...

6 years ago | 0

| accepted

Answered
How to plot histogramme?
If those values describe the bar height, you could use bar(___,width) and specify the width of the bars as 1 to resemble a histo...

6 years ago | 0

| accepted

Answered
How to perform shape factor analysis (circularity) on list of x, y coordinates
It looks like you're working with binary images in which case, you could use regionprops() along with the 'MajorAxisLength' and ...

6 years ago | 0

| accepted

Answered
Help with a scatter diagram
To plot the errorbars, use errorbar(x,y,neg,pos). Check out that link to get started (see examples within). To specify the x...

6 years ago | 0

| accepted

Load more