Community Profile

photo

Adam Danz


University of Rochester

879 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
Random Generator with known characters
Use randperm() or randi() One of those resamples without replacement while the other resamples with replacement (I'll let you re...

1 day ago | 0

Answered
how to change nomber of rows in the ui table?
Add empty rows to the "data" property. Here's a demo. data = get(handles.Table, 'Data'); % get the current data in your UI...

1 day ago | 0

Answered
Multiple Scattergram plots in the same figure
The easy way Create two different figure; then copy the axis of the second figure to the first figure and change the axis posit...

1 day ago | 0

Answered
How can I remove the bars without values in hist3?
Use histogram2() instead (req. 2015b or later). % Instead of hist3([x,y]); %use histogram2(x,y) By default bars with 0 he...

2 days ago | 0

| accepted

Answered
i have a function that should work but doesn't
Matlab doesn't know what "columns" means (nor "rows"). My guess is that 'columns' and 'rows' are the number of columns and rows...

2 days ago | 1

| accepted

Answered
Convert distance matrix to a table
Here's how to convert a matrix to a table and add column names. m =[1 2 0.2954 1 3 1.0670 2 ...

3 days ago | 0

Answered
How can i convert daily rainfall data in monthly data?
I suggest reorganizing your data into a timetable with 41273 rows and 4 columns: Time, Lat, Long, RainFall. Then you can use ...

3 days ago | 1

Answered
How can I add a table (independent of fig data) under figure?
In addition to Jan's UI table suggestion, you could convert the table to a character array and use text() to plot the array on a...

3 days ago | 0

| accepted

Answered
Multiple histogram with different colors for each bar
Use the output handles to the bar objects. h = bar(1:nx,matY'); h(1).FaceColor = [0 0 0]; %first bar group h(2).FaceColor ...

4 days ago | 1

| accepted

Answered
Sorting data in large data set
The data in the image you shared appear to be in a spreadsheet and surrounded by single quotes. I'll assume you've imported tho...

4 days ago | 1

| accepted

Answered
Extract and save data between two regions
Here's a rough idea that you can tweek so that it performs better. It involves calculating the slope of each line segment. The...

4 days ago | 1

| accepted

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

5 days ago | 0

Answered
How to extract rows which contains specific values in each row, then automatically repeat the process for a range.
The reason you're getting the same values is because "X" always equals the same thing: X = t1{:,{'x0102ThrottleNotch'}}; n=0...

5 days ago | 0

| accepted

Answered
Save char array from for loop into a matrix
No need to use a loop. If filenames is a cell array of strings and indx is a logical vectory (or linear index vector), you just...

6 days ago | 0

Answered
Extract data between peaks
This segregates the EMG1 data by every 2 right-foot steps. rightFootIdx = 1 : 2 : numel(locs); for i = 1:length(rightFootId...

6 days ago | 1

| accepted

Answered
Error using 'omitnan'
Check out nanmean() in the stats & machine learning toolbox. An alternative that doesn't require any toolboxes: nanidx = isn...

6 days ago | 0

| accepted

Answered
How make this code execute faster?
Sidx = ismember(1:size(X,1),S); M = X(Sidx,~Sidx); cost = sum(min(M,[],1)); This versions is slightly faster. I ran your ...

6 days ago | 0

| accepted

Answered
Change path of where the excel files are store and run the code
This will store the full path to all selected files as strings in a cell array. You can then loop through the cell array to act ...

8 days ago | 0

Answered
from squared signal to sine form
If the parameters of your square wave are known (amp, phase, frequency, shift), you can probably generate the sine wave directly...

9 days ago | 0

| accepted

Answered
Split function for text ( split(...) or strsplit(...))
Try this out. I don't have your data so I'm taking a shot in the dark. It may require a small tweak. str = extractFileText(f...

10 days ago | 0

Answered
How to write function for above combine matrix?
n = 7; m = 3; A = repelem((1:ceil((3*n)/2))',2,m);

10 days ago | 0

Answered
How to insert zeros in a data returns
For r2016b or later Assuming your dates are a cell array of strings in the format you described in the comments under your ques...

10 days ago | 0

| accepted

Answered
How can I write matrix for all variables/ arrays etc in workspace?
This sounds like a quagmire. Why not just save the data in a mat file? If you want to proceed with that idea, I recommend man...

10 days ago | 0

| accepted

Answered
How to Create Surface Plot From Cells?
Based on the discussion in the comments under the question, I think this is the approach you're looking for. It works (i.e. the...

10 days ago | 1

| accepted

Answered
change the color nodes
Your code is plotting each individual point within two for-loops. One option is to specify the color of the nodes within the fo...

11 days ago | 0

| accepted

Answered
Set the color of the axes per default to black (instead of dark gray)?
Try putting this in your startup.m file set(groot,{'DefaultAxesXColor','DefaultAxesYColor','DefaultAxesZColor'},{'k','k','k'}) ...

11 days ago | 2

| accepted

Answered
inner join two tables treating NaN entries as identical
Replace the NaNs with "inf", join the tables, then replace the inf with Nan. % Change NaNs to Infs A.Key2(isnan(A.Key2)) = in...

11 days ago | 0

| accepted

Answered
Including look up tables in a formula
I propose creating an anonymous function that stores the interpolated table and receives a velocity as input and outputs the ass...

11 days ago | 0

| accepted

Answered
convert string in app designer to dropbox output
This line is causing the problem app.nN = str2double(app.NoNodesEditField.Value); because app.NoNodesEditField.Value is alre...

12 days ago | 0

Answered
loop indexing length of non zeroes
Here are the steps needed to build your table. % Create fake data that looks like your example x = rand(2000,5); x(:,4) = 0;...

12 days ago | 0

Load more