Answered
Different coloured markers based on values
Use indexing. Create a logical array the same size as your data that identifies values < 0.05. idx = x < 0.05; Then you can...

6 years ago | 2

| accepted

Answered
How to create color map?
Use a stacked bar graph by entering an nxm matrix which will produce n bars each with m segments. h = bar(rand(20,40), 'stacke...

6 years ago | 1

| accepted

Answered
Plotting Various Colors & Symbols
This should get you started. You can tweek it to meet your needs and leave a comment if you have any problems. It creates 1 f...

6 years ago | 0

| accepted

Answered
Figuring out the most fitting prefix for a vector dataset
There are no axis labels on the histogram so I'm not sure what it represents. If it represents a distribution of y-values for t...

6 years ago | 0

Answered
UIFigure limit Menu Bar in App Designer
No-can-do. Even if you set app.UIFigure.Clipping = 'off'; At least as of r2020a (and the foreseeable future) the components...

6 years ago | 1

| accepted

Answered
How to scale the range of a custom colormap correctly?
Use caxis(limits) to scale the colormap limits of the axes. I also recommend including the optional axis handle input (see docu...

6 years ago | 0

| accepted

Answered
Sample dataset can not be found at matlab R2016b
That dataset was released after r2016b. If you need to use that dataset, you'll need to upgrade your version of Matlab. The dat...

6 years ago | 1

| accepted

Answered
Calculate mean of row for multiple files
" I have multiple .txt files, and each one has 30 rows and 1 column. " First you need the paths or the file names to each text ...

6 years ago | 0

Answered
changing YLabel position and outerposition
Source of the problem (scroll down for solution) TL;DR: Changing the position of the y-axis label triggers an axis resize that ...

6 years ago | 2

| accepted

Answered
Rounding date time to nearest half hour wihtin a table
If your datetime values are stored in a cell array, first convert them to a datetime array using, datetimeValues = [datetimeCe...

6 years ago | 0

Answered
To find the rms value
My bet is that you have a variable in the worksapace named "abs" which overrides Matlab's abs() function. When you run the li...

6 years ago | 0

| accepted

Answered
Colorbar - Ticklabel with variables
If the colorscale in the axes is logarithmic, you can't set the lower axis limit of the colorbar to 0. You could try, and it wo...

6 years ago | 1

| accepted

Answered
regroup identical coordinate pair
[~, unqIdx] = unique([X(:), Y(:)], 'rows','stable'); R_X = X(unqIdx); R_Y = Y(unqIdx);

6 years ago | 1

Answered
How do I create a multi-line tick label for a figure using MATLAB 7.10 (R2010a)?
A more modern approach to setting multi-row tick labels. Recent releases of Matlab have made it easier to set multiple rows of ...

6 years ago | 25

Answered
How to add a table beneath a plot?
The rows of the table are actually additional x-tick labels. There are several ways to plot a table under the axes but the cl...

6 years ago | 0

| accepted

Answered
How to plot two different styles of confidence intervals in looped subplots?
The line below from your code is plotting 30 lines for each axis. plot(ci,'LineWidth',1,'Color', [0 0 0.5],'LineStyle','--');...

6 years ago | 0

| accepted

Answered
How can i create a code which accept the 'peaks' of a quadrilateral and then give me the area of it?(without polyarea)
Follow this algorithm. There's a link toward the top of that page that shows how to implement the algorithm in JavaScript. Inc...

6 years ago | 0

Answered
str2double conversion error
You're witnessing floating point roundoff error. In short, an infinite range of numbers must be represented in a finite number ...

6 years ago | 1

| accepted

Answered
Colormap - contourf scaling and color distribution
Here are the changes I suggest you make. Lines that have been commented-out are lines you don't seem to need. The key change...

6 years ago | 0

| accepted

Answered
Handles in GUIDATA desappear when placed in 'CreateFcn'
"This is my first GUI and my first program so maybe this is not the best approach." Correct :) You've definitely invested so...

6 years ago | 1

| accepted

Answered
Missing dates in a dataset and filling in for them.
Convert your table to a timetable. Then use retime() to fill in missing dates on a daily basis. The columns will be filled wi...

6 years ago | 0

Answered
Is there any other way to set range in if- else statement?
Explanation of the error 0<45<2 is the interpretted as (0<45)<2 or, simplifed to 1<2 where 1 is TRUE. Solution if 0<m && m<...

6 years ago | 2

Answered
increasing the fontsize of the y-label tickmarks on a dendrogram/tree
Your y-labels aren't really tick labels. They are text objects. You need to store their handles and set their fontsize directl...

6 years ago | 1

| accepted

Answered
How is "quartely" defined in the function retime?
According to Wiki, In Gregorian calendar: First quarter, Q1: 1 January – 31 March (90 days or 91 days in leap years) Second ...

6 years ago | 0

| accepted

Answered
Inserting a randomized array into a for loop
No need for the conditional statements. Use indexing instead. Indexing is the life and blood of Matlab. XA = [5 6 2 6 5 3 3 ...

6 years ago | 0

Answered
Can I join with 1 variable and 1 value as "keyword"?
isMatch = dateMatches && ismember(T.Country, {'Austria','Belgium'}); Replace dateMatches with your date-matching code that pro...

6 years ago | 0

Answered
classifing output inot category
isGood = score > 17; % isBad?

6 years ago | 0

| accepted

Answered
only accept odd numbered input arguments
nargin counts the number of input arguments for a function. mod(x,2) returns 1 when x is odd. if mod(nargin,2)~=1 error...

6 years ago | 0

| accepted

Answered
Find the average in a window of random variables
Matlab has movmean() but it I don't think it can move by groups of n elements. This demo below computes a moving average for va...

6 years ago | 0

| accepted

Answered
share data between 2 uifigure in app designer version 2017
Here's the page you're looking for in Matlab's documentation. https://www.mathworks.com/help/matlab/creating_guis/share-data-a...

6 years ago | 0

Load more