Community Profile

photo

Adam Danz


University of Rochester

1.110 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
How would I create a script to read files line-by-line to save memory
Here's a demo that shows how to read in multiple lines of a file in chunks. I included lots of comments that explain what's goi...

ongeveer 8 uur ago | 0

Answered
Data Cursors on Line Plot With Spectrogram Subplot
Source of the problem The following sequence of functions are called when producing the spectrogram() plot. spectrogram() > ps...

ongeveer 9 uur 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...

ongeveer 9 uur ago | 0

Answered
How can I draw std ellipses in a scatter plot?
Here's a demo you can tweek to suit your needs. The "radius" in the x or y direction is 1 standard deviation. The "diameter" i...

ongeveer 9 uur ago | 0

Answered
How to change the name of an image?
You can use movefile() to create a copy of the file with a new name. Then you can use delete() to delete the old copies forever...

ongeveer 10 uur ago | 0

| accepted

Answered
How to insert grid lines specific position ?
Here's a demo % Define bound %bound(1) is the x value of the bottom, left corner of the frame %bound(2) is the y value for th...

ongeveer 10 uur ago | 0

| accepted

Answered
Avoid turning plot when on a figure
"I tried set(gca,'Ydir','reverse'), but it did not work." That's because for image() plots the ydir is already set to 'reverse...

ongeveer 11 uur ago | 0

| accepted

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

ongeveer 15 uur 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) = [];

ongeveer 16 uur 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...

ongeveer 16 uur 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...

ongeveer 17 uur 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...

ongeveer 18 uur 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...

ongeveer 19 uur 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 = ...

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

1 dag 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'}) ...

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

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

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

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

2 dagen 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'...

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

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

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

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

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

3 dagen 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 dagen 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 dagen 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 dagen ago | 1

| accepted

Load more