Community Profile

photo

Adam Danz


University of Rochester

833 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

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

View details...

Contributions in
View by

Answered
How to find a column with a specific set of numbers
Use ismember() with 'rows' option. % m is your matrix colIdx = ismember(m.', [6 0 0], 'rows')'; % note the transpose of m ...

etwa 4 Stunden ago | 0

Answered
Using imagesc to make a matrix a heatmap, how can I mark an 'x' inside the cell of max value of each column?
Here's a simpler version that uses an "X" in text format. Just replace my fake "C" with your real data. C = magic(9); I = i...

etwa 4 Stunden ago | 0

| accepted

Answered
how to solve equation for a given matrix
What's wrong with what you've already got? %Vector method e = rand(100,1)*10; Eq = 0.4075*exp(-((e-14.87)/11.39).^2) + 0.56...

etwa 10 Stunden ago | 0

| accepted

Answered
remove the blank area surrounding the figure
"How can I I remove the blank area surrounding the figure, which means to enable the figure to fill the whole window" fh = figu...

etwa 11 Stunden ago | 0

Answered
Matlab: use axes handles of another figure for a new figure
If you're trying to create several figures with the same format but different data, you'd want to copy the entire figure, and th...

etwa 11 Stunden ago | 0

| accepted

Answered
How to read specific data from a text file
You should be able to pull both numbers out at the same time with this: LaLoTokens = regexp(text1,'Station +(\d*\.?\d+) +N +(\d...

etwa 13 Stunden ago | 1

| accepted

Answered
How to update plot data manually?
What about giving refreshdata() a shot? Here's how it would work with your description. % Create your 4 axes and their initia...

ein Tag ago | 0

Answered
Test Results in a table
This should get you started. This solution only saves the h and pValue outputs - you can add in the stat and cValue variables b...

ein Tag ago | 0

| accepted

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
You're trying to put x items in y spaces. For example, in the lines below I'm trying to put 3 numbers in 1 space. x = [10,11,...

ein Tag ago | 0

Answered
NAN answers problem in matrix
First, two take-home messages 0/0 = nan Once you have a NaN in your data, it potentially spreads like wildfire The NaN is fir...

ein Tag ago | 0

| accepted

Answered
use color bar as item in App-designer drop down list
I don't think that's possible in app designer. Here's are two alternatives that will require a little work but they're doable. ...

ein Tag ago | 0

Answered
How to make two plots happen at the same time on two different axes?
Here's a demo to follow. It creates two axes that display the time course of a sine and cosine wave. Run it, step through it t...

ein Tag ago | 1

Answered
Removing repeating data points but keeping the first and last ones
A is your input matrix, Ap is the trimmed matrix. isUnq = find(~any(diff(A([1,2],:),[],2)==0, 1))+1; keepColIdx = unique([1,i...

ein Tag ago | 0

Answered
How to find position of a number in an array using a drop down
Here's how to create a quick UI dropdown list populated with values from column 1 of your matrix. After the user make a selecti...

ein Tag ago | 0

| accepted

Answered
Extracting a matrix by row and column from a large matrix
I changed your example matrix a bit to make sure it ignores partial pattern matches. m = [1 1 1 2000 1 1 1 2000 ...

2 Tage ago | 0

| accepted

Answered
Vector inside another vector
S =(0:30)'; k = 15; U = S .* (S>=k);

2 Tage ago | 0

| accepted

Answered
How to save AUTOMATICALLY all opened figures (unknown amount) in one .pdf file.
Get handles to all open figures: figHandles = findall(0,'Type','figure'); Then use export_fig() to save them to a PDF using ...

2 Tage ago | 1

| accepted

Answered
Follow up: How can I merge two different tables using the first column in common?
I find it easier to first combine the matrices into a 3D array. This should work with any number of matrices as long as they are...

2 Tage ago | 0

Answered
Normalize Matrix to 512?
I know next to nothing about .sift files but if you search for "512" in this link, you'll find the same instructions you shared ...

3 Tage ago | 1

Answered
How to dynamically name each box on a boxplot?
You can convert the nested field names into a string using this FEX submission: fieldnamesr() Then you can use those strings as...

3 Tage ago | 0

| accepted

Answered
Why do these two different way to find slope give different results?
The basic fitting tool merely calls polyfit() using your x and y values (see link for more info). You can get the same coeffi...

3 Tage ago | 1

| accepted

Answered
A basic question of matrix indexing can't get a proper output
Here are some improvements to your code so that it works no matter what size A is. A = [1:5; 6:10; 11:15; 16:20]; v= A(:,2...

3 Tage ago | 0

Answered
Any possibilities of using sortrows for strings
If I'm understanding correclty, no need for sortrows(). b = {'hello';'world';'hello world';'world hello'}; a = [3 1 4 2]; R...

3 Tage ago | 0

| accepted

Answered
how can fill a table using a loop ?
No-loop method There's no need for a loop. b = cumsum(a)./(1:length(a)); Loop method If you must use a loop... b = zeros(...

3 Tage ago | 1

| accepted

Answered
How can I estimate the average for each one of the intervals in an x axis?
This is relatively straight forward with histcounts() and splitapply(). % Create fake data x = randi(1000,1,1000); %doesn'...

3 Tage ago | 1

| accepted

Answered
Generating matrix of integers with distinct rows
In this method, we'll assign a random permutation to each row, row-by-row, and if it's not a different set of integers than the ...

4 Tage ago | 0

| accepted

Answered
Define multible Global Variables
Maybe it's a sign from the god of "Best Practice" to not use global variables ;) Your declarations should (still) work. Don...

4 Tage ago | 2

Answered
Create a vector of vector exponents
No loop method: m = cell2mat(arrayfun(@(x)v*A.^x,1:n,'UniformOutput',false)') Test result with loop version mm = zeros(6,5); ...

4 Tage ago | 0

Answered
group every ten cell array
c = cell(1,180); % the original 1x180 cell array newCell = mat2cell(c,1,repmat(10,1,18)); %the new nested cell array

5 Tage ago | 0

| accepted

Answered
use 'enable' in ui table
geeks g is refering to UItables (from previous discussions). Read about the 'enable' property here: https://www.mathworks.c...

5 Tage ago | 0

| accepted

Load more