Community Profile

photo

Adam Danz


University of Rochester

1,094 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
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...

11 hours 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); resu...

11 hours ago | 0

Answered
Concatenate two audio files
If your intentions are to subsample every 8000 values in y1 and then concatenate y2 to the end, y3 = [y1(1:y1_sample_rate:nume...

11 hours ago | 0

| accepted

Answered
How could I set the legend for a particular bar in a bar chart?
Assign a name to the "DisplayName" propery of each grouped bar handle. The display name will be used in the legend. Here's an e...

11 hours ago | 0

Answered
how to enter function into app designer ?
To add a function to app designer, open your app in app designer, go to the "Code View", then on the top of the left column you'...

11 hours ago | 0

Answered
How to get the point under mouse click on the plot or histogram?
You can use the ButtonDownFcn function. Here's a demo you can run. It prints the selected bar index to the command window. fig...

21 hours ago | 0

| accepted

Answered
inputparser fails to accept correct value
isinteger(1) % = FALSE This matlab function (which often causes confusion) does not determine if the input has an integer val...

22 hours ago | 0

| accepted

Answered
Testing if a input is a numerical (double) of character
You can use str2double() to convert the string to numeric. If the string did not contain something that can be converted to num...

23 hours ago | 0

| accepted

Answered
Auto close uifigure upon deletion of handle from workspace
"This would prevent opening many instances of the class when running some script multiple times, while the handle to the GUI is ...

1 day ago | 0

Answered
ERROR came as "Index exceeds matrix dimensions".
f1 = 0; % 12th line of your code; so, f1 only has 1 element % (later in your code...) for j=2:J % interior nodes ...

1 day ago | 0

Answered
how can i generate random number divided by 0.25 from 0 to 10 for example(0.25,7.75,5.50,6.25 ,........)?
% Generate 12 random number between [0,10] rn = rand(1,12)*10; % Round to nearest .25 rnRounded = floor(rn) + round(rem(rn,1...

1 day ago | 1

Answered
How can i show plot inside ui app instead of another figure window?
Specify the UI Axis handle in the first input to plot(). plot(app.UIAxes, imageData); % __________ or whate...

2 days ago | 1

| accepted

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...

3 days 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...

3 days 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 ...

3 days 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...

3 days 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...

3 days ago | 3

| accepted

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...

3 days 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...

3 days 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...

4 days 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...

4 days 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 ...

4 days 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...

4 days 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...

5 days 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...

5 days 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...

5 days 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...

6 days 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 ...

6 days 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, ...

6 days 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'...

6 days ago | 2

| accepted

Load more