Community Profile

photo

David Hill


Last seen: Today Active since 2017

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

All
  • MATLAB Mini Hack Participant
  • Treasure Hunt Participant
  • 36 Month Streak
  • Revival Level 2
  • Magic Numbers Master
  • Word Puzzles Master
  • Personal Best Downloads Level 4
  • 5-Star Galaxy Level 4
  • Promoter
  • Sequences And Series II Master
  • Cody5 Easy Master
  • Number Manipulation II Master

View badges

Content Feed

Solved


Simpson's Paradox - Calculate correlation coefficients for groups of data
Simpson's Paradox is a statistical phenomenon where groups of data can have a characteristic while the whole data set together h...

3 hours ago

Solved


Dog Statistics
The vectors ht and wt contains the heights and weights of 20 golden retrievers. In some cases, it was not possible to make both ...

3 hours ago

Solved


Find the minimum of the column-maximums of a matrix
Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum...

3 hours ago

Solved


Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

3 hours ago

Solved


Find Closest Constant
Given a number x, return the value that is closest to x from this list of constants: 0, 1, , e, , (also known as ). For exampl...

3 hours ago

Solved


Determine if x is a combination of m and n
Given positive integers x, m, and n, determine if x can be written as x = am + bn for any (non-negative) integers a and b. Your ...

4 hours ago

Solved


Calculating Student Grades
The matrix grades contains raw grades for 7 students who took your course. Each row represents a different student. The first 7 ...

4 hours ago

Solved


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

4 hours ago

Solved


Calculate the mean of each half of a matrix
Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

4 hours ago

Solved


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

4 hours ago

Solved


Sub-Diagonal Sum
Given a (m x n) matrix and a value r {1,-1}, change every element to the sum of the diagonal led by the element. r=1 > regular ...

4 hours ago

Answered
How can i do this on matlab?
roots([7 0 11 -2 5.98 10 15.9 1 5.347 11])

7 hours ago | 0

Answered
defining a list of class instances
classdef Node properties Title NodeType NodeList RelationType Impor...

4 days ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
readcell function returns "failed to convert character code" error
Just use save command.

4 days ago | 1

| accepted

Answered
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

Answered
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

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

4 days ago

Answered
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

Answered
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

Answered
How do I prevent MATLAB from converting characters into their ASCII equivalent?
A=repmat('*',1,10) A=repelem('*',10)

5 days ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Load more