Community Profile

photo

Adam Danz


University of Rochester

1,505 total contributions since 2014

Email: feel free to contact me regarding my shared files on the file exchange. I don't do free consulting outside of the forum so if you have a Matlab question, post the question to the forum and you may email me the link to the question.

About me: Finishing PhD soon on topics related to vision science; neurophysiology; sensory-motor feedback and control; control systems; steering & navigation; multisensory integration; top-down bottom-up feedback loop.

"If I had only one hour to save the world, I would spend fifty-five minutes defining the problem, and only five minutes finding the solution." -Albert Einstein

"An expert is a person who has made all the mistakes that can be made in a very narrow field." -Niels Bohr

"If you are not embarrassed by the first version of your product, you've launched too late" - Reid Hoffman

Contact

Adam Danz's Badges

  • Thankful Level 3
  • Personal Best Downloads Level 3
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • 12 Month Streak
  • Guiding Light
  • Revival Level 3
  • Knowledgeable Level 4
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
x axis label plot
Here are two different syntaxes to create a stem plot (they are also links to explain the syntax). stem(Y) stem(X,Y) If you...

3 hours ago | 0

Answered
Figure colorbar is not refreshed
Control the limits of the colorbar using caxis(). This line adjusts the colorbar limits to the range of your data. caxis([min...

3 hours ago | 0

Answered
how expand plots with different x-axis ranges
Specify the edges for both histograms rather than letting that funciton choose the bins. histogram(X,edges) If the data fro...

4 hours ago | 0

Answered
Matlab considers different two equal numbers!
You could limit the values in your matrix to the first 4 decimal places but this is usually not a good idea unles there's a reas...

4 hours ago | 0

Answered
Resize plot to fit text
Get the extent of the text objects after plotting the text. Add the vertical position and height to get the upper position of ...

6 hours ago | 1

Answered
Error using plot Vectors must be the same length.
The cross correlation function xcorr() will produce an output with 2*M-1 elements where M is the number of elements in the input...

6 hours ago | 1

| accepted

Answered
Non linear least square fitting
Create noisy circular data This section creates the noisy data we're fitting. % Create randome points along a circle r = 22...

6 hours ago | 1

| accepted

Answered
Why am I getting "Array indices must be positive integers or logical values"?
This line below implies that you're trying to index values from an array N where the index values must be positive integers or l...

7 hours ago | 0

Answered
How to read file .txt?
Assuming your text file is named myTextFile.txt and contains only that matrix, A = readmatrix('myTextFile.txt'); % for Matlab ...

7 hours ago | 0

| accepted

Answered
How do I shade the xy plane at z=0 of my plot and how to stop the plot after it passes z=0?
The easiest solution is simply zlim([0,inf]) I also added grid on so we can see the 3D coordinates better. However, the data b...

7 hours ago | 0

| accepted

Answered
How can I find the parcentage of values in a vector that are bigger than 5.
p = sum(v>5)/numel(v); If there are NaNs you'd like to ignore, p = sum(v>5)/sum(~isnan(v));

8 hours ago | 0

Answered
How to display result in Text Area in Matlab Appdesigner
It's unclear whether you're working with numeric or text values. App designer has edit fields that return text and edit fields ...

8 hours ago | 0

Answered
Print user-defined error messages as a table
msg = sprintf(['Polygon not supported. List of supported polygons is:\n' ... ' Triangle\n Square\n Pentagon\n Hexagon\n Hep...

3 days ago | 0

| accepted

Answered
First cell in array is empty
oops! Typo... should be for i = 1:length(theta) % ^^ end Two more unrelated tips: Always pre-allocate your lo...

3 days ago | 1

| accepted

Answered
How to filter a cell array filled with strings?
This will return a logical array the same size as 'A' where TRUE values indicate elements of A that meet the following requireme...

4 days ago | 1

| accepted

Answered
Change bar colors based on date
The only place in your data where I see moon phase is in column F of your spreadsheet and only the first month is indicated. Th...

4 days ago | 0

Answered
How can I put a display that shows changing variables in a plot?
Use h=text(. . .) to create the text object and then update the handle as needed. Here's a demo clf() axh = axes(); h = te...

4 days ago | 0

Answered
How can I use Textbox input from GUI in a separate script?
"I want to use the input of the textbox of my gui which i have created with guide, in a seperate Matlab script" There are sever...

4 days ago | 0

Answered
Why is format long providing a strange result?
It's because of the way you're combing two variables in the output display. Look at the last iteration of your 2nd for-loop. ...

4 days ago | 0

Answered
Swapping entries in column of table
I'm not sure why you're using string characters instead of numbers but I'll assume you have a reason for that. Here's how to ide...

4 days ago | 0

| accepted

Answered
What does the 'imfuse' output mean?
Regarding the line of code Fused = imfuse(Image3, Image4, 'falsecolor'); For the falsecolor method, by default, Fused is a com...

4 days ago | 1

Answered
STROOP TEST- COGENT
The handle to the text object and the handle to the "square" (not sure what you mean here, it could be a rectangle object, a pat...

4 days ago | 0

| accepted

Answered
On Startup: function name warning
None of the toolboxes are crashing - those are just warnings that you've got two functions with the same name. Don't delete a...

4 days ago | 0

Answered
Correct way to detect Zero crossing
The entire function can be replaced with y = I<1e-8; which will return a logical (true | false). If you want a double (1 |...

4 days ago | 0

Answered
moving scroll index in a ui figure
TL;DR: Don't waste your time, it's not currently possible in AppDesigner (r2019b). Programmatically scrolling to a specific r...

4 days ago | 1

| accepted

Answered
Error using speech2text
Hmmm..... it still looks like you're not using the most recent version. In this section of your error stack Error in speech2...

4 days ago | 0

Answered
UIFigure Keyboard control update
"I am looking for an approach on how to provide the input control for the uifigure" Idea 1: add buttons to your App One approa...

4 days ago | 1

| accepted

Answered
How can I save a figure within app designer?
update: try out copyUIAxes() from the file exchange copyUIAxes() recreates a UIAxes in a new figure. It copies the UIAxes child...

4 days ago | 2

Answered
User input has to be a natural number between 1 to 15
Simply add the mod() part to your while requirement. mod(x,1)==0 checks that x is an integer. I also clarified the instrutio...

4 days ago | 1

| accepted

Answered
Cut timetable data following certain conditions
Well, that took a little more time than I anticipated! Here's a demo with inline comments explaining the details. I added a...

5 days ago | 0

Load more