# 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,237

REPUTATION**4,578**

CONTRIBUTIONS

**0** Questions

**1,956** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**497**

RANK**2,485** of 18,124

REPUTATION**640**

AVERAGE RATING**4.80**

CONTRIBUTIONS**21** Files

DOWNLOADS **139**

ALL TIME DOWNLOADS**4949**

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

1 day 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); ...

1 day ago | 0

Round to nearest ones place value ex ante

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

1 day 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';

1 day 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)

1 day ago | 0

readcell function returns "failed to convert character code" error

Just use save command.

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

1 day 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)

1 day ago | 0

Solved

Pay up

You live in a world where arbitrary denominations of currency exist. You owe your friend a sum of money denoted by s. However, i...

2 days ago

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

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

2 days ago | 0

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

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

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

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

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

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

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

4 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

5 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)

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

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

6 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)

7 days ago | 0

Solved

Easy Sequences 72: Complete Graph

In Graph Theory, we say a graph is a Complete Graph, if all of its nodes are connected to evey other nodes in the graph. Example...

7 days ago

Solved

Définir une fonction creneau

Definr une fonction "creneau" qui prend en entrée un vecteur et renvoie la valeur 1 pour chaque élément positif du vecteur et...

7 days ago

Solved

sinus de pulsation a

Ecrire une fonction sinat qui prend en entrée un vecteur t (de valeurs croissantes) et renvoie un vecteur y de de même dimensi...

7 days ago

Solved

Magic Matrix

We are all familiar with the concept of magic matrix. In a magic matrix, the summation of all rows, columns and both diagonals...

7 days ago

Solved

Dominant Matrix - 01

A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

8 days ago

Solved

Loja de tintas

Faça um programa para uma loja de tintas. O programa deverá receber o tamanho em metros quadrados da área a ser pintada. Conside...

12 days ago

Unier matrices de diferentes tiempos e interpolarlarlas

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

13 days ago | 0

Solved

Voltage in a lamp

A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

13 days ago