# Dave B

### MathWorks

I am a software engineer at MathWorks. My work focuses on graphics and charting.

**Statistics**

RANK**92**

of 250,372

REPUTATION**1,296**

CONTRIBUTIONS

**0** Questions

**404** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**118**

RANK**11,812** of 17,392

REPUTATION**24**

AVERAGE RATING**4.00**

CONTRIBUTIONS**2** Files

DOWNLOADS **10**

ALL TIME DOWNLOADS**103**

RANK

of 104,060

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Unable to set ticks on a colorbar

If you want your color to range from 1002 to 1018: caxis([1002 1018]) % or set(gca,'CLim',[1002 1018]) This will let you la...

10 days ago | 0

| accepted

How to prevent contour plot from setting axis limits?

contour doesn't reset the limits, perhaps you didn't set hold to on? or didn't specify x and y for your contour? If you're still...

15 days ago | 0

| accepted

MATLAB: combine two cell arrays of string at a specific position

If I understand the question correctly, you can just specify the indices where you want your strings to go. A={'Moose';'Goos...

22 days ago | 0

Autoregressive model for EEG feature extaction

ARfit is a collection of tools for AR models: https://www.mathworks.com/matlabcentral/fileexchange/174-arfit SIFT is a set of E...

24 days ago | 0

Make Equal tick spacing in a loglog plot

If you want n logarithmically spaced ticks (which would appear linearly spaced on a log plot, you should just set the ticks to b...

28 days ago | 0

| accepted

Axis scale on a subplot log graphics

When you want to match the axis limits, a helpful trick is to store the handles to each axes so that you can later query/set the...

29 days ago | 1

| accepted

How to find number of pixels (or matrix count) in a group in a given imagesc or data

There are a few functions for finding little regions like this, but if you have the Image Processing Toolbox you might consider ...

1 month ago | 1

| accepted

Receive Error using / Arguments must be numeric, char, or logical when I am using histogram

histogram returns a graphics object, so when you try to divide that by n you'll get an error. If you're looking for the values ...

1 month ago | 0

| accepted

problem in sorting an array with "sortrows" command

A good way to sort one array using the order of another is with the second output argument of sort: timeorder=[3.4,7,1,8,5.1,9]...

1 month ago | 0

| accepted

Submitted

densityScatterChart

A scatter where the color (and/or transparency) of the markers indicates the density of points.

1 month ago | 9 downloads |

A question about adjustment the Histogram2 Properties

For the first bit, you can set the EdgeColor to 'none'. For the second bit, getting 'squares' depends on both the fact that bin...

2 months ago | 1

| accepted

How to use a for-end loop to load in 6 xlsx files and plot all the data within them on one plot?

I guess you have two options about how you're going to tell MATLAB about all those xlsx files - either you're going to construct...

2 months ago | 0

setting the "hold" property for axes

The hold function corresponds to the NextPlot property on the Axes. I realize that's a little confusing - hold has only two st...

2 months ago | 1

| accepted

Bar graph grouped with two y axis

bar graphs don't collaborate between sides of a yyaxis very well, but you can fake it by padding with zeros: x = categorical({'...

2 months ago | 1

| accepted

Please help, i have the idea of what I'm wanting to find but do not know how to actually code this!

How about something like this: % You might consider readmatrix or readtable instead of load... % But load works for such simpl...

2 months ago | 1

Help creating xbar control chart

You specified x as a vector, but controlchart doesn't accept x as a vector. controlchart is going to use means and limits, and i...

2 months ago | 0

Plot multiple tables from workspace using for loop

If you want to reference the tables as you describe, you'd need them in an array (in C, or in MATLAB): t1=table((1:10)',rand(10...

2 months ago | 1

| accepted

Parse error at "t"

When you multiply in MATLAB you need a * symbol r = -10*e-1.8t; should be r = -10*e-1.8*t;

2 months ago | 1

How to do the check box in GUI app designer ??

You should not use global, roi should probably be a property on your app. But I think to prevent it from being deleted, you nee...

2 months ago | 0

| accepted

How can I insert a bunch of 6x6 matrices into a larger 30x30 matrix?

I think you're saying: you have an existing 30x30 matrix and some existing 6x6 matrices, and you want to put the values from one...

2 months ago | 0

Plotting polarplot with 2 months in each from a 12 month dataset

You didn't say much about what's going wrong, but one thing I noticed is that your hold on statements are in the wrong spot. You...

2 months ago | 2

| accepted

Finding the indexes of values of one vector to another Matlab

What you described here is the second output of sort: a = [13.8487, 20.8059, 23.5011, 23.2286, 22.2261]; [sorted_a,com...

2 months ago | 0

Repeating elements of an array

There are two really useful repeat functions: repmat and repelem repelem is good for repeating an element n times, so I think...

2 months ago | 0

hist error: Input arguments must be numeric, but all my input is numeric?

From your description it sounds like when you called readtable, it read the values as strings rather than numbers. When you call...

2 months ago | 0

Help normalizing data in table

When you want to work with multiple variables in a table at once, you have to use { } (this is because tables work with heteroge...

2 months ago | 1

| accepted

spectrogram - auto settings for zlim are too wide

I'd guess that the color limits (i.e. CLim not ZLim) are tightly fitting the data, but you have a pixel or two that is making it...

2 months ago | 0

How to plot Histogram/bar graph for two data sets!!

I think there are a few ways to interpret your question. Do you mean you want to show two bar charts describing the histogram ...

2 months ago | 0

| accepted

Using multiple functions on a variable in a table

How about just initializing the new table variable first (e.g. with NaN values) and then populating it using your indices? T ...

2 months ago | 0

How to create a standalone executable file?

You can create standalone executables using MATLAB compiler. A product information page is here: https://www.mathworks.com/pro...

2 months ago | 0

3D surface plot

You can interpolate using a scatteredInterpolant to make a matrix over the range of X and Y and then use surf to draw it, but I ...

2 months ago | 1

| accepted