# David Hill

### Carnegie Mellon University (CMU)

Last seen: Today Attivo dal 2017

Followers: 1   Following: 0

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

All

#### Feeds

Visto da

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

8 mesi fa | 1

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

8 mesi fa | 0

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

8 mesi fa | 0

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

8 mesi fa | 0

Risposto
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);

8 mesi fa | 0

| accettato

Risposto
How to convert lat lon to utm data and plot it in 10x10m^2 grid map.

8 mesi fa | 0

| accettato

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

8 mesi fa | 1

| accettato

Risposto
Trying to shade the area between upper and lower confidence bands on Kaplan Meier Curve

8 mesi fa | 0

| accettato

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

8 mesi fa | 1

| accettato

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

9 mesi fa | 0

| accettato

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

9 mesi fa | 0

Risposto
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

9 mesi fa | 0

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

9 mesi fa | 0

Risposto
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

9 mesi fa | 1

Risposto
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

9 mesi fa | 0

| accettato

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

9 mesi fa | 0

| accettato

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

circa un anno fa | 0

| accettato

Risposto
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,:)

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

| accettato

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

circa un anno fa | 0

| accettato

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

circa un anno fa | 1

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 1

| accettato

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0