Community Profile

photo

Adam Danz


University of Rochester

1,104 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
Finding TP, TN, FP, FN using histc. First Input must be a real non-sparse numeric array (error)
The negation is turnning the array into logical. ~smapImg(gtImg) Example t = uint8(rand(1,10)) class(t) ans = 'uint8' ...

2 hours ago | 1

Answered
How to remove a specific object from cell
Try this out idx = cellfun(@(x)isequal(x,obj3),AllObjects); %logical index AllObjects(idx) = [];

3 hours ago | 0

Answered
normxcorr2 - technical reference document
Technical reference; scroll down to the "algorithms" section (see comments below). https://www.mathworks.com/help/images/ref/no...

3 hours ago | 1

Answered
Easiest way to change variables based on decisions made by user?
If you're not already working from a GUI and the only interface is this one question, here's a quick and easy solution. respon...

4 hours ago | 1

| accepted

Answered
indexing problem in cell array
Tested on r2014a (after brushing the dust off of it). % Create cell array as is described in the quesiton Zellprojekte = stru...

5 hours ago | 0

Answered
Deleting circles drawn using viscircles
The handles are being overwritten on each iteration of the i-loop so at the end of the loop, you only have access to the last dr...

5 hours ago | 0

Answered
How to add a legend in the Mapping Toolbox?
Use the DisplayName property (you can change the labels from my example) Use the output handles produced in scatterm() Provide...

5 hours ago | 0

Answered
How to solve this equation with two variables in one equation ?
Loop through index values rather than a vector of values. Store each iteration in w(n,c) and pre-allocate w with NaNs. A = ...

19 hours ago | 0

| accepted

Answered
Find Number of Elements in an Array
The "A" array provided in the question will result in a dimensions mismatch error. I'm assuming A is an [nx2] char array. A ...

21 hours ago | 0

| accepted

Answered
How can I compare two columns at the bar chart?
Here's a demo to get you started. clf() h = bar([210, 140, 175, 160]); set(gca,'xtick',1:4,'xticklabel',{'A','B','C','D'}) ...

22 hours ago | 1

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

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

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

1 day 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'...

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

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

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

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

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

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

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

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

4 days ago | 0

| accepted

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

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

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

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

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

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

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

5 days ago | 1

| accepted

Load more