Community Profile

photo

Adam Danz


Last seen: Today

University of Rochester

1,719 total contributions since 2014

Email: feel free to contact me regarding my shared files on the file exchange. I don't do free consulting outside of the forum so if you have a Matlab question, post the question to the forum and you may email me the link to the question.

About me: Finishing PhD soon on topics related to vision science; neurophysiology; sensory-motor feedback and control; control systems; steering & navigation; multisensory integration; top-down bottom-up feedback loop.

"If I had only one hour to save the world, I would spend fifty-five minutes defining the problem, and only five minutes finding the solution." -Albert Einstein

"An expert is a person who has made all the mistakes that can be made in a very narrow field." -Niels Bohr

"If you are not embarrassed by the first version of your product, you've launched too late" - Reid Hoffman

Contact

Adam Danz's Badges

  • Explorer
  • Ace
  • Thankful Level 3
  • Personal Best Downloads Level 3
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • 12 Month Streak
  • Revival Level 3
  • Knowledgeable Level 4
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
generate a random path between two points
Because I like random walks (example1, example2), I altered an existing code I have to (kind of) do what you're describing. Howe...

19 hours ago | 0

Answered
How to remove the Range from colorbar in HeatMap
Heatmaps are notoriously difficult to customize outside of the HeatmapChart Properties. The only property that I'm aware of tha...

23 hours ago | 0

| accepted

Answered
MATLAB Answers Wish-list #5 (and bug reports)
Spell check for questions / answers / comments A spell check option would improve the quality of content, reduce misunderstandi...

23 hours ago | 3

Answered
How do I show a line being created (like an animation) between two points inside a plot?
If needed, interpolate your data to get more or less data points. Here's an example xvalues = 1:16; yvalues = (1:16).^2; n...

1 day ago | 1

| accepted

Answered
How to combine arrays in a cell from 71 x 12 to 1 x 71?
% Loop through the rows of Cmo and combine them % back into 1 table. Then sort the rows so that % they are in chronological ...

1 day ago | 1

| accepted

Answered
Adding two node labels to graph
There are lots of ways to do this. Here's a simple approach that uses labelpoints from the file exchange instead of labeling th...

1 day ago | 0

| accepted

Answered
Dicom file in app designer
You just need to specify the UIAxis handle in your app. Here's a functional demo using a built-in dcm file. info = dicominfo(...

1 day ago | 0

| accepted

Answered
How to have a loop-for to filling NaN rows?
The best approach would be to do this within the j-loop from this answer (you just need to change 1 line and add 3 lines). The ...

1 day ago | 1

| accepted

Answered
How to get point value in app designer plots?
Provide the app's figure handle in your call to datacursormode. The window DisplayStyle is not supported in UIfigures. The d...

2 days ago | 0

Answered
How can I update the x axis limit inside a loop?
On the first iteration, om is all 0s so [om(1) om(end)] returns [0,0] which, as you pointed out, is not allowed when setting axi...

2 days ago | 0

| accepted

Answered
Find the values before an element repeated more than 4 times.
Input: A, numeric row vector Output: valueBefore, a numeric vector of values prior to 4 or more consecutive 0s. A=[ 1 2 3 ...

2 days ago | 1

| accepted

Answered
Is it possible to use the for-loop for this purpose?
Using the cell approach where Cmo is a nx12 cell array of n station-tables for 12 months. stationList is read in as a table. T...

2 days ago | 1

| accepted

Answered
How do I write a function to convert numerical month of the year to the name of that month?
Another method to return month names given month numbers using datetime and month, monthNames = month(datetime(1, 1:6, 1), 's')...

2 days ago | 1

Answered
Problems with averages and storing values
Advice & hints Smart-indent your code for better readability (I already applied correct indentation to the code in your questio...

3 days ago | 0

Answered
creating circles for multiple points with viscircle
To plot a set of circles defined by their center points and a radius, you can use the the rectangel function with 100% curvature...

3 days ago | 0

Answered
Problem with obtain regression equation between 2 data sets
Polyfit is probably what you're looking for. From the documentation, "If either x or y contain NaN values and n < length(x), th...

3 days ago | 1

| accepted

Answered
How to get answers to appear as an array?
It looks like your outputs are being produced within a loop. Instead of displaying their values within the loop, collect the va...

3 days ago | 0

Answered
How do you randomly choose a grey bar in picture to turn white?
For grayscale images, imwrite() assumes that the dynamic range of the first input is [0,1] and automatically scales the data by ...

3 days ago | 2

Answered
How to write a loop for this case?
The variable "C" is a 1xn cell array where each element contains a table. Each table contains a column "date" listing dates in ...

3 days ago | 1

| accepted

Answered
R2019b tiled layout
"the colorbar looks strange" I assume you mean that the colorbar size doesn't scale with the axis size after applying axis imag...

4 days ago | 0

| accepted

Answered
How can I find an uifigure?
You can find the uifigure handle using findall() but it's not recommended to merely find handles to all figures because it's qui...

4 days ago | 0

| accepted

Submitted


labelpoints
Automatically label points in your plot given x and y values & an array of labels.

4 days ago | 102 downloads |

Thumbnail

Answered
hyperlink and center alignment in msgbox
If you are using App Designer or creating apps with the uifigure function, then use uialert instead of msgbox. However, neith...

4 days ago | 0

| accepted

Answered
Colorbar with diamond-shape blocks
Here are two methods to create a custom legend. Method 1: Plot dummy variables that only appear in the legend. plot(nan,nan,'...

5 days ago | 2

Answered
Can someone help me create a plot that resembles this figure from a scholarly paper?
I don't recommend using heatmap due to its inflexibility. imagesc will work for this figure. You'll have to add the colorbar...

5 days ago | 0

| accepted

Answered
how to convert cell to double
There are 12 elements in your cell array. Each element is a matrix but of different sizes. OUT = 1×12 cell array Column...

5 days ago | 0

| accepted

Answered
App design UI figure How to Add Excel like Sort & filter selection
My comment moved here to close out the question. ---------------------------------------------------------------- There's curr...

6 days ago | 1

| accepted

Answered
Adding a Legend with Variables as inputs
Try this. hold on for r = minr : incrr : maxr %start the plotting z = (r./lambda).*((r./lambda).^(r-1)).*(exp(-(x./r).^...

7 days ago | 1

| accepted

Answered
How do I get this function to accept one input argument, a vector representing the three coefficients of the quadratic in the order a, b, c?
You're on the right track but there's some cleaning up to do (I have only evaluated the syntax). 1) Q1_18035200 is a really b...

7 days ago | 1

| accepted

Answered
How do I display a Table on Command Window?
Here are two methods that produce that table. The first defines each column of the table. The second converts the matrix into ...

8 days ago | 0

Load more