# David Hill

Electrical Engineering with minors in Computer Science and Mathematics. Working as an Undergraduate Research Assistant in the field of Robotics.

**Programming Languages:**

Python, C++, C, Java, MATLAB, HTML, Arduino

**Spoken Languages:**

English, Spanish

**Professional Interests:**

**Statistics**

RANK**39**

of 265,287

REPUTATION**4,582**

CONTRIBUTIONS

**0** Questions

**1,957** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**498**

RANK**2,481** of 18,128

REPUTATION**641**

AVERAGE RATING**4.80**

CONTRIBUTIONS**21** Files

DOWNLOADS **135**

ALL TIME DOWNLOADS**4963**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

defining a list of class instances

classdef Node properties Title NodeType NodeList RelationType Impor...

4 days ago | 0

Store prime and non-prime numbers in two diferent vectors from a .txt

Attach Natural_numbers.txt is below does not work m=readmatrix('Natural_numbers.txt'); idx=isprime(m); nonprime_num=m(~idx); ...

4 days ago | 0

Round to nearest ones place value ex ante

a=1400; b=2600; r=randi([a b]); abs(r-a)<abs(r-b);

4 days ago | 0

How can I plot a string input?

figure ax=gca; t = text(0.5,0.5,'David'); s = t.FontSize; t.FontSize = 12; ax.Visible='off';

4 days ago | 1

| accepted

How to write a script to test central limit theory

n=10; r=sum(randi(6,1000,n),2); m=mean(r); s=std(r); histogram(r,15)

4 days ago | 0

readcell function returns "failed to convert character code" error

Just use save command.

4 days ago | 1

| accepted

Error using horzcat Dimensions of arrays being concatenated are not consistent.

VD = depth; rho = Rho; ac = (1./Vp.*10^6).*0.000305; VES2 = (1/0.0313)*log(0.38./Phi); % Vertical effective stress by using At...

4 days ago | 0

How can I plot a string input?

I assume you want to display. display('David') txt =input('What is your name','s'); display(txt)

4 days ago | 0

How to count the number of rows per group

A=[a,b,c]; u=unique(A,'rows'); d=zeros(size(A,1),1); idx=any(isnan(A),2); d(idx)=nan; f=find(~idx); for k=1:length(f) ...

4 days ago | 0

| accepted

i get this error "attempting to load ybus script as a function"

Not sure what you are doing, but works fine for me. z = [0, 1, 0, 1.0; 0, 2, 0, 0.8; 1, 2, 0, 0.4; 1, 3, 0, 0.2; 2, 3, 0, 0.2; ...

4 days ago | 0

How do I prevent MATLAB from converting characters into their ASCII equivalent?

A=repmat('*',1,10) A=repelem('*',10)

5 days ago | 0

How can I plot the graph of this double integral function in Matlab?

r = linspace(10^-2,10^2); eta=zeros(size(r)); hold on; for delta= [1 2 3 4 5 6] for k=1:numel(r) f=@(x,y) x.*exp(-3.44.*r...

5 days ago | 0

| accepted

Set different properties using for loop

Recommend a lookup table for the material. Then just index into when data is needed. matLookup=[0.26,5E-3,3.6,4.5E-9,0.28,820;....

5 days ago | 0

How to return logical array with only the longest row-consecutive equal to true

I = [0 0 1 1 1 1 1 1 0 0 0 0; 0 0 1 0 0 1 0 0 1 0 0 1; 1 1 1 1 1 1 0 0 0 0 0 0]; i=[zeros(size(I,1),1),I,zeros(s...

5 days ago | 0

| accepted

Why is my loop not running? (Error using / Matrix dimensions must agree)

Cannot multiply by the entire array (cp). %heat transfer % A(i) = -((L*D*(cp(i) - cinf)) + (kair*(Tp(i) - Tb))); B(i)...

7 days ago | 0

| accepted

how to compute random??

Run a simulation many times below. tol=.01; for k=1:1000 %I ran the simulation 1000 times n=rand(1,10000); An=cumsum(n)...

7 days ago | 0

| accepted

moving averag : Out of memory. The likely cause is an infinite recursion within the program.

m=readmatrix('TX.txt'); x=movavgFilt(m(:,2)',5,'Center');%data needs to be row vector

7 days ago | 0

Create a unit vector from two locations?

MTH2 = [0.472 1.364 0.06]; CoM = [0.471 1.147 0.903]; UnitVector = (CoM - MTH2) / norm(CoM - MTH2)

7 days ago | 0

Replacing value by the mean of the two nearest neighbors

B = [20; 18; NaN; 25; 100; 15; -50; 23; NaN; 15; -15; 30]; idx=find(isnan(B)); B(idx)=mean([B(idx-1),B(idx+1)],2); idx=find(B...

7 days ago | 0

| accepted

How to permute elements of jth column of a matrix iteratively

A=[1,2,3 ; 7,8,9 ; 13,14,15]; perms_of_(A,2) function A_perms = perms_of_(A,j) p=perms(A(:,j)); for i = 1:length(p) A_p...

9 days ago | 0

| accepted

How To change Diagonal Elements with a string in matrix using FOR loop or other preferred method?

a='ALEX'; b=diag(double(a)); b(b==0)=48; string(char(b)) char(b)

9 days ago | 0

Unier matrices de diferentes tiempos e interpolarlarlas

newMatrix=[A;B;C];%where A,B,and C are your current matrices.

16 days ago | 0

How to calculate rate constant if population vs time table data is given?

N=[1 2 3 4.5 7 10 16 29 56 104]; fit((1:length(N))',N','exp1')

20 days ago | 0

How to generate a specific number of values within a range ?

a=sort(rand(10,2),2); A=[]; for k=1:size(a,1) A=[A;linspace(a(k,1),a(k,2),60)]; end

20 days ago | 0

Better work through indecies in a for loop

Just use continue. for n = 1:length(start0) if start0(n)-240 < 360 % If the filter time is not big enough then move ...

20 days ago | 0

| accepted

Different answers when I do the same integration

They are not the same expressions. syms x int((1+cos(x))^2,0,pi) int(1+2*cos(x)+cos(x)^2,0,pi) int(1+cos(x)^2-2*(1-cos(x)),0...

20 days ago | 0

How to read x and y values from a text file?

Should attach file for us to test. m=readmatrix('points.txt'); x=m(:,1)';y=m(:,2)';

20 days ago | 0

| accepted

Find rows based on set of values/codes

for i = 1:size(data,2) if all(ismember(data(i,:),[0 1 13 31 42 53]))%include 0

20 days ago | 0

For loop error, not getting desired output

x = [1 2 3 5; 4 3 1 3; 1 3 3 4]; y = [1 2 3 5; 4 3 1 3; 1 3 3 4]; columns = 3; for i = 1:columns correct = 0; for j...

22 days ago | 0