Community Profile

photo

Adam Danz


University of Rochester

1.085 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 email messages through matlab central unless they pertain to one of my file exchanges).

University of Rochester, NY
New Bulgarian University, Sofia Bulgaria

Contact

Adam Danz's Badges

  • 12 Month Streak
  • Guiding Light
  • Thankful Level 2
  • Revival Level 3
  • Knowledgeable Level 4
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
"break" in for loop seems to not be working
Old version of this (incorrect) answer is replaced to avoid confusion. Better advice in comments below.

alrededor de 20 horas ago | 0

Answered
how to construct a cell array from another cell array
This fits the description from your comment under your question. It horizontally concatenates all combinations of the row vecto...

alrededor de 22 horas ago | 0

Answered
Best Way to find density of [x,y] coordinates within set window
Here's an alternative that uses inpolygon() to determine whether coordinates are within a defined rectangular window centered at...

alrededor de 23 horas ago | 1

| accepted

Answered
How to Break 'switch' statement without exiting entire 'while' loop.
Unlike other programming languages, "When a case expression is true, MATLAB executes the corresponding statements and exits the ...

1 día ago | 0

Answered
Interpolating linearly between many values in a vector
Set the 'resampleRate' to 1000 if you want [1,2] to become [1.001, 1.002, ... 2.999]. 'timestamps' is your original vector. r...

1 día ago | 0

Answered
Performing operations on row elements in a matrix
I replaced your example with a matrix that has more rows. To divide row n by row n+1, element-wise, my_mat = randi(6,4); res...

1 día ago | 0

Answered
How to open .m fiile in editor and move to specific line number?
openAndGoToLine() Input 1 is a string identifying the absolute path to the file. Input 2 is an integer indicating the line num...

1 día ago | 3

Answered
Add title to one row of a subplot
You can use the new sgtitle() to create a single title for a group of subplots within a figure but I don't think it's possible t...

1 día ago | 0

Answered
Interrupting a Callback with a Push Button
"Inside the while loop, I want to check whether a certain push button has been pressed" The callback function for the pushbutto...

1 día ago | 1

Answered
How to enable a figure so that if I click on a point and it will show the value?
Active "data tips" and then you can click on any plotted coordinate to return the (x,y,z) values. From r2018b to present, the to...

1 día ago | 0

| accepted

Answered
How to compare words in a line
Attached are 2 text files. "txt.txt" contains the text you shared in your comment under your question. "dcm.txt" is a vertical l...

2 días ago | 1

| accepted

Answered
Numerical errors in corrcoef
When you plot the results against eachother (code below), the pairs all fall along the diagonal but with tiny aberrations that a...

2 días ago | 3

| accepted

Answered
How to match points in two unequal list?
Here's how to find the closest value in B for each value in A. A = [1.1 2.2 3.1515 4.92121 1.1]; % Row vector! B = [1.25 ...

2 días ago | 0

| accepted

Answered
Copy down cell value until new value and repeat for specific range
If you choose to do this in Matlab, this should get you started. It reads in a spreadsheet named "data.xlsx" as a table and pul...

2 días ago | 0

Answered
Which way is better?
In terms of speed, the 2nd option is 3.0 times faster on average (p<0.0001, Wilcoxon Signed Rank; 1 million individually timed i...

3 días ago | 1

Answered
How to replace values above a given percentile by nans
Here is an alternative function that ignores NaN values. It's not a nice one-liner like Star Striders but it does produce the sa...

3 días ago | 0

| accepted

Answered
Linking two push buttons in Matlab GUI
Here is a complete demo you can run that allows you to drag-and-drop any GUI object that is assigned a KeyPress and KeyRelease f...

3 días ago | 0

Answered
how to pick up all combination of numbers from multiple vectors
This solution requires that all vectors are placed into a single cell array. See comments for more detail. % Demo data a = 1...

4 días ago | 0

Answered
How do I show rows and columns from a matrix in a edit texted in MATLAB?
Your matrix does not contains many rows. In fact, it's a row vector so it only contains 1 row. You can see this in your first ...

4 días ago | 0

| accepted

Answered
How to convert cell to cell array of character vectors.
At least one of the elements in btl_data.POLYGON is not a character vector. This demo below recreates the error. A = [48.44, ...

4 días ago | 0

| accepted

Answered
How to name different groupes of variables in one vector with indices of another?
Updated interpretation Generator = [3111 3112 3111].'; mod1 ={'\Delta \omega' '\Delta \delta'}; mod2 = {'\Delta \psi'...

4 días ago | 2

| accepted

Answered
Comparing words in text file line by line
"I got a text file with only one word in each line. How can I open and compare each word from this file with required word in a ...

4 días ago | 1

| accepted

Answered
insert text as watermark in video( one frame)
Based on the error message, it appears that "block" is an [m x n x 1] array (or simply, [m x n]). You're accessing "block" in a...

4 días ago | 0

Answered
How do I associate specific colors with specific numbers of a matrix?
You set 9 colors in your colormap but you only have 6 unique intergers in "A". That means you're asking matlab to distribute 9...

4 días ago | 0

| accepted

Answered
Insert missing date and corresponding values in a matrix?
If you're looking for timelines that contain segments of start/stop times, here's a method. data = { '03-Jan-2018 16:58:09' '0...

5 días ago | 0

| accepted

Answered
How to Remove Rows in Table
Read in the data; determine which rows are empty under "LikesAnimals"; then remove those rows. t = readtable('data table.xlsx...

5 días ago | 1

| accepted

Answered
App Designer: Radio buttons that prompt User input (Novice)
In the "selection changed" callback function to the radio buttons group, you can ask the user for more information using the inp...

5 días ago | 0

Answered
Problem with dropdown itemdata propiety
If you're using ItemData, the "Value" property will return the ItemData associated with your selection and it will be in the for...

5 días ago | 0

| accepted

Answered
Create pie chart in if loop
From the documentation, "pie(X) draws a pie chart using the data in X. Each slice of the pie chart represents an element in X." ...

5 días ago | 0

Answered
Normalization of colorbar showing bincounts of binscatter
I would use histcounts2() to determine the density within each bin. Then you can normalize those data and send it into histogra...

5 días ago | 0

| accepted

Load more