photo

David Hill


Carnegie Mellon University (CMU)

Last seen: Today Active since 2017

Followers: 2   Following: 0

Message

Master's Student in Robotic Systems Development (MRSD), BS Electrical Engineering with minors in Computer Science and Mathematics.

Programming Languages:
Python, C++, C, Java, Javascript, R, MATLAB, CSS, Arduino
Spoken Languages:
English, Spanish
Professional Interests:
Robotics and Autonomous Systems, Embedded Systems

Statistics

All
  • MATLAB Mini Hack Participant
  • Treasure Hunt Participant
  • Ace
  • 36 Month Streak
  • Strings II Master
  • R2016b Feature Challenge Master
  • Personal Best Downloads Level 4
  • 5-Star Galaxy Level 4
  • Cody Challenge Master
  • Matrix Patterns III Master
  • Indexing I Master
  • ASEE Challenge Master

View badges

Feeds

Answered
nested loop shows only the result of last iteration
Index W_T T=10 W_T=zeros(T,T-1); for n=0:T-1 W_t=(1+r*(1-tau)).^(-(T-n)).*C_0*epsilon.^T.*K^(1/gamma); for m=n+1...

1 year ago | 1

Answered
Calculating the differences of elements in an array
x=rand(1,10) d=x-x(1)

1 year ago | 0

Answered
I want to add third loop for n variable in mentioned code having n= 3.7 4.9 5.7 8.9 but code is giving lines for n=3.7 only why?
The values of n are not affecting Sk; therefore, the graphs are plotting over the top of each other and only 5 graphs are displa...

1 year ago | 0

Answered
Why does my code take so long to run?
You can use this code, but you will have to still split up f and h to have enough memory. Based on your ranges, the highest scor...

1 year ago | 0

Answered
I need help graphing these simple functions. I keep getting a blank graph
Need a few more dots. r=linspace(0,100,101); v=(r./(r+100))*10; p=(v.*(r).^2)./r; grid plot(r,p);

1 year ago | 0

| accepted

Answered
How to convert lat lon to utm data and plot it in 10x10m^2 grid map.
% Step 1: Load Data from Excel data = readmatrix('subtowersutm.xlsx'); % readmatrix instead of readtable

1 year ago | 0

| accepted

Answered
Plotting solutions with symbolic variables
h=10;P=100;Ac=5;Lc=17;aff=19;Tw=7;Ta=5;Li=11;%have no idea what your constants are syms Tsp1 km; xb = (h * P)/ (km * Ac); mb ...

1 year ago | 1

| accepted

Answered
Trying to shade the area between upper and lower confidence bands on Kaplan Meier Curve
A=readmatrix('data table.csv','Range','A13:D408'); timeDays=A(:,1)';probability=A(:,2)';Lower=A(:,3)';Upper=A(:,4)'; plot(time...

1 year ago | 0

| accepted

Answered
seach string in arraycell and find idx
C = {'A',31; 'B',5; 'C',3}; idx = find(ismember(C(:,1),{'A'}))

1 year ago | 1

| accepted

Answered
transform exponential number to decimal
M1 = importdata("M1.mat"); A = compose('%d (%3.2f%%)', [M1(:,1), M1(:,2)])

1 year ago | 0

| accepted

Answered
Catenary at different height between 2 fixed points ?
maximum a is minimum y. And the minimum cable length can be found using: a=2;H=10; minL=2*a*sinh(H/2/a) Use cable length > mi...

1 year ago | 0

Answered
Can you help me create a function according to mathematical formula?
A=randi(128,1,20) for k=1:3 B=sum(A)/numel(A); idx=A<B; g{k}=A(idx); A(idx)=[]; end g{4}=A; g

1 year ago | 0

Answered
how to speed ...i need very fast code
q=6062; matrix=matri(1:q,:); c=size(matrix,2); COR=zeros(c); a=matrix; for yy=1:c b=matrix(:,yy); COR(yy,:)=round(s...

1 year ago | 0

Answered
Plot multiple variables from table with different x axes
figure;hold on; for i=1:10 stairs(eval(sprintf('Map1.Distance_%1d',i)),eval(sprintf('Map1.Ca_%1d',i))); end

1 year ago | 1

Answered
New line after fprintf in a for/ while loop
a=randi(100,1,100); for k=1:100 formatSpec = 'a is %2g\n'; if a(k)>90 fprintf(formatSpec,a(k)); end end

1 year ago | 0

| accepted

Answered
how to make a loop with an if condition for a system of equations
z2 =[-0.17162382699849727786214078518756;-0.091002558325694825093302376780363;... -0.031615696698776074425432150707406;-0.0...

1 year ago | 0

| accepted

Answered
How to round numbers using the decimals as a probability?
A=10*rand(1,10) B=floor(A)+((A-floor(A))>rand(1,10))

1 year ago | 0

| accepted

Answered
Is there a function like movsum which simply gets the values in a given sliding window rather than summing them?
b=1:10; a=b; n=5;%window size for k=1:n-1 a=[a;circshift(b,-k)]; end a=a'; a=a(1:length(b)-n+1,:)

1 year ago | 0

Answered
Create Number and excluding
No need for loops. A=randi([5,15],1,100); A(A==9|A==13)=[]; A

1 year ago | 0

Answered
Analysing PWM duty cycle of a signal
s=pwm>threshold;%pwm is your signal, threshold is when it is considered on or off d=diff(s); idx1=find(s,1); idx2=find(d==-1)...

1 year ago | 0

Answered
Storing Data and working out an equation
Just index, no loop needed. Filtered_Gear_rpm=rand(40000,1);%sample data Filtered_NES_rpm=rand(40000,1);%sample data x=Filter...

1 year ago | 0

Answered
solve non-linear equation
Use fzero eqn=@(z)exp(-z)+pho*exp(L-2*z)-G;%you could plot the function to find the approximate location of the root z=fzero(e...

1 year ago | 0

| accepted

Answered
Index in position 2 exceeds array bounds
for i = 1:numel(uniq) Tyro1{i} = table2cell(REQtyr(ismember(resSeq,uniq(i)),["AtomName","X","Y","Z"])); Tyro{i} = tabl...

2 years ago | 0

| accepted

Answered
Error in for loop (issue with variable calling)
for i = 1:1 z1 = importdata("Xxsv0000"+num2str(i)+".txt"); Time{i} = z1.data(:,1); ...

2 years ago | 1

Answered
Find column number for every row in matrix
a=[ -1 4 1 1 -1 -1 -5 4 -1]; A=(a>0)'; [b,d]=find(A); [~,e]=unique(d); b(e)

2 years ago | 0

Answered
How do I crop a matrix within desired numerical limits?
M=[-2+16*rand(100,1),-17+9*rand(100,1),-3+5*rand(100,1)]; M(M(:,3)<-2|M(:,3)>1,:)=[]; M(M(:,2)<-16|M(:,2)>-9,:)=[]; M(M(:,1)<...

2 years ago | 0

Answered
How to select vectors from a set of vectors
x=[1 1 1 1 0 0 0 0;1 0 0 0 1 1 1 0;0 1 0 0 1 0 0 1;0 0 1 0 0 1 0 1;0 0 0 1 0 0 1 0]; r=randi(8,1,500); y=x(:,r)

2 years ago | 1

| accepted

Answered
I need to combine those three martix into a single big one. How do I do that?
blkdiag(randi(10,2),randi(10,2),randi(10,2))

2 years ago | 0

Answered
Compare vector to two other vectors
m=randi(100,1,20); n=randi(100,1,30); k=randi(100,1,10000); [M,N]=meshgrid(m,n); x=min(M,N); z=zeros(size(x)); u=unique(x)...

2 years ago | 0

Answered
Function might not be used error
[e,t,a]=CalcTip(100,3) [e,t,a]=CalcTip(100,4) [e,t,a]=CalcTip(100,5) [e,t,a]=CalcTip(100,2) function[error, tip, amoun...

2 years ago | 0

Load more