Community Profile

photo

Adam Danz


Last seen: Today

University of Rochester

2,631 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

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

View details...

Contributions in
View by

Answered
How can I connect the points on my graph?
You need to store the values within the loop and then plot them after the loop. The changes will look something like this inco...

1 day ago | 0

| accepted

Answered
How to calculate how many plot tick would exist if the axis completely filled the figure
Given an axis within a figure, compute what the x and y axis limits would be if the axis extended to the edges of the figure. ...

2 days ago | 0

Answered
Add or subtraction a unit to matrix even elements in matlab
r=[1,2,3,4;5,6,7,8;9,10,11,12;13,14,15,16] isEven = mod(r,2)==0; z = r; z(isEven) = z(isEven)+2 If you intended to ask how...

2 days ago | 0

Answered
Printing cell array values as simple numbers?
Options to convert a 1xn cell array containing scalar numbers to a vector (or string) rng('default') % for reproducibility x ...

2 days ago | 1

| accepted

Answered
Creating a curved line
What intersections? The first plot can be greately simplified to th = [0:.05:pi, pi:.05:2*pi]; x = linspace(0,1,numel(th)); ...

2 days ago | 0

Answered
How to do correlation from data with series
You can use xcorr and indexing. t=[21,22 ,323,43,231,53,23,12,53,12]; c=[23,12 ,223,333,21,63,24,23,763,14]; p=["1","1","1",...

2 days ago | 0

Answered
Centroid of two arrays
I agree that the documentation on describing the inputs could be more specific. Look at the examples in the documentation for c...

2 days ago | 0

| accepted

Answered
Cannot share my MATLAB online files to others.
Place the shared content within a folder and share the folder. https://www.mathworks.com/help/matlabdrive/ug/share-and-collabo...

2 days ago | 0

Answered
Count number of values of a Matrix inside a range and plot it
bins = [0,3,4,5,15]; h = histogram(B(:),bins); To get the counts within each bin, h.Values

2 days ago | 0

| accepted

Answered
How to calculate the number of times the values of a column changes
This demo matches your 2nd example. This temporarily breaks up the table into sub-tables based on the ID and loops through eac...

3 days ago | 0

| accepted

Answered
How to declare a global variable in Startup function of matlab app.designer
Do not use global variables, especially in AppDesigner. Instead, declare a public or private property accessible anywhere wit...

3 days ago | 0

| accepted

Answered
Create table from data
Summary of comments under the question, Instead of initializing T as an empty cell, use an empty table. T = table(); A1 = ...

3 days ago | 0

| accepted

Answered
Compare for uniqueness between 2 very large matrices
To determine if two arrays are 100% identical, use isequal or isequaln to ignore NaN values. To determine if columns in matri...

3 days ago | 0

Answered
Plotting random points within Boundary
If you have the perimeter coordinates, you can create a bunch of random numbers and then eliminate the ones outside of the perim...

3 days ago | 0

Answered
I can't randomly distribute the dots
> I want you to be like the image of a building collapsed in an earthquake. Height points scatter all over the x and y axes Wha...

3 days ago | 0

Answered
ignore NaN values in loop
The image below shows the location of your missing values. The good news is that the missing values either consume entire colum...

4 days ago | 0

Answered
How to change columns width in uitable
Set multiple rows of ColumnName strings, uit.ColumnName{3} = sprintf('Product\nEmissions\n(Kg CO2eq)\n'); % uit is the uita...

4 days ago | 0

Answered
prompt user to reenter function
See examples, Use a wrapper fcn to re-prompt user if input is empty Input must be 1 letter Input must be Yes|No

4 days ago | 0

Answered
How can I change elevation data in point cloud
Extract (x,y,z) coordinates from the pointCloud object (ptCloud.Location), make changes to the coordinates, and then reassign to...

4 days ago | 0

Answered
plot graph from cell array
This is the result I get and the plots are clearly different (the shape and the y-axis-limit). For comparison, equate the axi...

4 days ago | 0

| accepted

Answered
Reading cell array from excel table, which contains different sizes of doubles
There might be a smoother method but this works with the data from your image. file = 'Book1.xlsx'; opts = detectImportOptio...

5 days ago | 0

| accepted

Submitted


rectangle2
Similar to Matlab's rectangle() but with more options.

5 days ago | 8 downloads |

Thumbnail

Answered
Draw rotated rectangle with rounded edge
I created a function to extend the capabilities of Matlab's rectangle() but with these additional features: Position rectangle...

7 days ago | 1

| accepted

Answered
Display value in plot "Groups Bars"
How to label bar heights for non-stacked bar plots This demo adds labels above each bar. To add the labels at the top but wit...

8 days ago | 0

| accepted

Answered
Plot with 2 X Axis. Y Axis blurry
It looks like the y-axis limits do not match between both of the axes. The only reason you're using two axes, as far as I can...

9 days ago | 0

| accepted

Answered
Can I use arrows to move Data Tips on scatter plots?
It appears that keyboard control of DataTips is not supported in scatter(). However, a less-than-perfect workaround is to plot ...

9 days ago | 1

Answered
How can I combine these two MATLAB codes? (MATLAB)
This should get you started, s=tf('s'); C=5*(1+0.8*s); P=1/(s*(5*s+1)); CL=feedback(C*P,1); figure step(CL) ax = gca()...

9 days ago | 0

| accepted

Answered
How do i separate data?
Assuming fs is the sampling frequency in Hz, load('06-11_36.mat') resampleInteval = 20; % seconds dataResampled = data(1 :...

9 days ago | 0

| accepted

Answered
How to set the max and min value of the colorbar to be displayed on a Heatmap on Matlab 2015
You're using the older HeatMap from the bioinformatics toolbox. Instead, use heatmap which supports caxis(). If you have a ...

9 days ago | 0

| accepted

Answered
How can I put a stopwatch that counts how much time has passed since opening an app?
> I want to measure the time that passes since I open an app Create a timer object in the startup function of the App and start...

9 days ago | 0

| accepted

Load more