Community Profile

photo

Adam Danz


University of Rochester

510 total contributions since 2014

Finishing PhD soon.
Vision science; neurophysiology (single unit); sensory-motor feedback and control; control systems; steering & navigation; multisensory integration; top-down bottom-up feedback loop.

Helping others is the greatest learning opportunity.

(I don't reply to personal messages unless they are in regards to one of my file exchanges).

University of Rochester, NY
New Bulgarian University, Sofia Bulgaria

Contact

Adam Danz's Badges

  • 6 Month Streak
  • Thankful Level 2
  • Revival Level 3
  • Pro
  • Knowledgeable Level 4
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
non overlapping random circles
The FEX contributions Matt J cited might be better but here's an alternative I coded up JFF (just for fun). After you chose t...

6 hours ago | 0

Answered
how to get element from matrix
Here's a summary of the comments under the question so that this question is marked as answered. The variable "T" is a structu...

15 hours ago | 0

Answered
How can I display a value of a vector for a specific value?
p = [5 0 6 7 0]; w = [6 2 5 6 7]; % Show the values in w that correspond to p==0 w(p==0) ans = 2 7

1 day ago | 0

Answered
How to insert a row in a matrix
data = rand(31,12); % your original matrix newRow = zeros(1,size(data,2)); ...

1 day ago | 0

Answered
contour plot real numbers
The values of 'sigmaP1 ' are imaginary. You can identify this just by looking at those values. sigmaP1 (1:5) ans = Column...

1 day ago | 0

Answered
Error using exist "The optional second input to exist must be 'var', 'builtin','class', 'dir' or 'file' "
It looks like you're checking the existance of a certain file named something like "A1.txt" on the matlab path prior to reading ...

1 day ago | 0

| accepted

Answered
Copy data from cell array to table
Here are some fake data that look similar to yours. A = {string(rand(18977,1)), rand(18977,1), rand(18977,1), rand(18977,1)}; ...

1 day ago | 1

| accepted

Answered
Match cell array of strings to table row names
First I create fake data (in the future, it would be helpful for you to provide this). Then we'll use ismember() to match the r...

1 day ago | 1

| accepted

Answered
Problem with defining size of a matrix
The error is coming from a function (or m-file) named "Q2". Perhaps the "myCGS()" function is stored in an m-file named "Q2"? ...

2 days ago | 0

| accepted

Answered
delete and handling matrix
To identify rows of a matrix where column 8 is less than 3 and column 6 is not zero, rowIdx = (matrix(:,8) < 3) & (matrix(:,6)...

2 days ago | 0

| accepted

Answered
Assigning new matrix values from another matrix's rows
If the converstion from [nx3] to [nx2] is arbitrary (ie, not calculable), here's how to create a lookup table and do the convers...

6 days ago | 1

Answered
how to solve this in matlab
This solution relies on only one for-loop (although technically you could replace this for-loop, too). 'sumOut' is the solution ...

7 days ago | 1

| accepted

Answered
Copying the content of a Figure to another Figure
The function copyobj(h,p) copies objects listed in h to a new parent, p. When your code is run, the error message indicates, "...

8 days ago | 0

Answered
How to plot a specific value in Y-axis?
First, your example references the x-axis; not the y-axis. Here's how to plot a portion of the data along the x axis. The same...

8 days ago | 0

Answered
find peaks of a vector contains nan values
The code in your orginial question differs from the code you provided in the comments under your question. In your original code...

8 days ago | 0

| accepted

Answered
Self avoiding random walk help
Working from the cleaner version of your code I provided in the comments under your question, here's an adapted version that avo...

8 days ago | 0

| accepted

Answered
How to read data from a text file based on the title?
Instead of selectively reading a chosen subset of your text files (which I'm not even sure is possible), you can read in the ent...

8 days ago | 0

| accepted

Answered
Retrive cell names from structure into a string vector
See fieldnames() https://www.mathworks.com/help/matlab/ref/fieldnames.html

9 days ago | 0

| accepted

Answered
2D colour coded plot with already binned data
I'm not entirely sure what you mean by specifying the bins or edges but I interpret it as specifying the x and y tick marks for ...

9 days ago | 1

| accepted

Answered
Value to get back to initial
This solution finds the time window that starts and ends when dialysis is at 75 and 150, respectively. I created fake data to w...

10 days ago | 0

| accepted

Answered
Set up a function corresponding to this graph
In addition to the square() function (requires signal processing toolbox) and the heaviside() function (symbolic math toolbox), ...

10 days ago | 0

| accepted

Answered
Updating matrix with time
The solution depends on how the matrix is being updated but here's a general framework to updating a time varying matrix using i...

12 days ago | 1

| accepted

Answered
hypothetical matlab's limit
I'm sure there is such a limit in Matlab but it's nowhere near a vector length of 4884. The problem is that you have at least...

12 days ago | 2

Answered
Does any elegant way to pass augments through nested function calls
Instead of using vargin, you could include one input that is either a cell array or a structure. Example using cell array al...

12 days ago | 0

| accepted

Answered
How can I average one column based on the bins created for the other column?
This example creates a fake dataset to work with. It then creates bins for the elevation data in steps of 12. Using splitapply,...

12 days ago | 0

Answered
How can I put these subplots into a for loop?
Since we don't have access to your data, I've made some assumptions. Most importantly, I'm assuming 'timex' is monotonically in...

12 days ago | 0

| accepted

Answered
To operate a function in all rows of matrix
The range() function computes the difference between max and min values. When the input is a matrix, it acts on the columns. T...

12 days ago | 0

| accepted

Answered
corrplot plotting on strange x and y axes values
Yeah, this is annoying. You can loop through each scatter plot and set the x and y limits to the x,y ranges within the data. ...

12 days ago | 1

Answered
Visualize pressure on a cylinder surface
Assuming your data are stored in a matrix named 'data', X = reshape(data(:,1), length(unique(data(:,1))), []); Y = reshape(d...

13 days ago | 1

| accepted

Answered
What is the decimal RGB scale used in Matlab called?
As Rik Wisselink mentioned, RGB values are scaled to 0-255 (8 bit means 2^8 which equal 256). Matlab normalizes each RGB value ...

13 days ago | 1

| accepted

Load more