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
  • Ace
  • 36 Month Streak
  • Cody 10th Anniversary 10-Day Streak
  • Magic Numbers Master
  • Personal Best Downloads Level 4
  • 5-Star Galaxy Level 4
  • Word Puzzles Master
  • Promoter
  • Sequences And Series II Master
  • Cody5 Easy Master

View badges

Content Feed

Answered
For Loop help for function input
r=randi(2,5,4); r(r==2)=5

12 hours ago | 0

Answered
Convert 8x3 char to string sequence (MATLAB)
val=['011' '010' '001' '000' '000' '001' '010' '011'] val=val' val=val(:)'

17 hours ago | 0

Answered
Empty plot returning when I try to graph
[i,j]=meshgrid(1:1000); xtip=i/1000-.1; y=(j-500)/1000; rr=hypot(xtip,y); K=.5605; M=K./(sqrt(2*pi*rr)); plot(rr,M, "--");...

17 hours ago | 0

Answered
loading multiple xlsx files using for loop and readmatrix
for k=1:7 data{k}=readmatrix(sprintf('model_%d.xlsx',k));%create cell array assuming the sizes are not the same end

17 hours ago | 0

| accepted

Answered
Displaying even numbers in a series
n=1:.5:10; n(mod(n,2)==0)

17 hours ago | 1

| accepted

Answered
I would do I calculate the surface area of an abnormal shape?
pgon(i)=polyshape(g(:,1),g(:,2)); plot(pgon(i)); A(i)=area(pgon(i));

21 hours ago | 0

| accepted

Answered
How to categorize elements in a matrix based on positive or negative terms and assign them '0' and '1'
A=[ 0.468505878281799 -1.90580778081907 -2.25397431420907 -3.46546394734966 0.488991442582022 -1.68349064240944 0.37733413...

22 hours ago | 0

Answered
For loop not stopping
Instead of a for-loop, just do it all at once. idx=aspect(:,1)==-9999; aspect(idx,1)=nan;

22 hours ago | 0

| accepted

Answered
Select only some coordinates from a .txt file
n=readmatrix('nodes.txt'); m=readmatrix('filename.txt'); newMatrix=m(n,:)

23 hours ago | 0

| accepted

Answered
Rearranging matrix of sth elements
n=1:1716; N=[]; for k=1:66 N=[N,n(k:66:end)]; end

2 days ago | 0

| accepted

Answered
writing binary number with specific length (MATLAB)
n=3; A=0.2; B=[0.7 0.5 0.3 0.1 0.1 0.3 0.5 0.7]; K=dec2bin(B/A,3)

2 days ago | 0

| accepted

Answered
how to use "randi" in specific case?
n=10;%length of matrix l=[10 15 20 25]; m=zeros(length(l),n); r1=randperm(length(l));r2=randperm(n,length(l));r3=randperm(len...

2 days ago | 0

Answered
How do I get the angle between three points input by ginput() in appdesigner?
z=[x,y]; d=diff(z); Angle=acos(dot(-d(1,:),d(2,:))/norm(d(1,:))/norm(d(2,:)));

2 days ago | 0

| accepted

Answered
how to change decimal point place
I am not sure how your numbers are stored. Are they stored as character arrays or doubles? a='3.261505126953125'; b=[a(1),',',...

2 days ago | 0

Answered
How to randomize points using a GUI
Please accept my previous answer if it was acceptable to you. GUI function GUI() f= figure; axes('Parent',f,'Position',...

2 days ago | 0

| accepted

Answered
How to fill the region formed by four lines?
beta11_um1 = @(delta11) 4.1797+0.396*delta11; beta11_lm1 = @(delta11) 0.4090+0.396*delta11; beta11_up1= @(delta11) 3.8058-0.4...

2 days ago | 2

| accepted

Answered
turning the loop answer into a vector
load data_matrix.mat data=SECTION_L; data(:,1:3)=[]; row=9; cleanup=data([1 2 3 row],:); c=1; for i = 1975:2016 for j...

3 days ago | 0

| accepted

Answered
Create a loop with condition
Does not seem like you need random values, but rather all values between -5 to 5 [x,y]=meshgrid(-5:.001:5);%generates all x0 pa...

3 days ago | 1

| accepted

Answered
I need my array to hit zero before starting next iteration
diff_counts=[20 40 60 80 100]; cases1=zeros(1,10080); starts1=sort(randi(10080,1000,1),'ascend'); for j=1:1000 cases1(star...

3 days ago | 0

Answered
Exact value of a result
residuez requires doubles as input, but p is just the roots of polynomial a which you could use symbolic to produce. a=sym([1, ...

3 days ago | 0

Answered
I need my array to hit zero before starting next iteration
Not sure if I completely understood your question, but break will break out of the for-loop. diff_counts=[20 40 60 80 100]; ca...

3 days ago | 0

Answered
how to calculate for a range of values for different initial conditions
beta=linspace(0,(pi/2),90); m=[1.25, 2, 6, 10]; [B,M]=meshgrid(beta,m); gamma= 1.4; theta=atan(2.*cot(B).*((M.*sin(B)).^2-1)...

3 days ago | 0

Answered
Help writing a function for a gui
Not sure what you want the randomize function to do. f= figure; axes('Parent',f,'Position',[0.05, 0.25, 0.9, 0.7]); x = 0.25;...

3 days ago | 0

| accepted

Answered
Help reduce number of rows by grouping continous data
d=find(diff(yourData)>1); m=[yourData(1),yourData(d(1))]; for k=2:length(d) m(k,:)=[yourData(d(k-1)+1),yourData(d(k))];%ge...

3 days ago | 0

| accepted

Answered
list all 9 integer between -3.5 and 5.5
unique(fix(-3.5:5.5))

3 days ago | 1

| accepted

Answered
How to access the double cell 5*1 ?
Your question is not clear to me. If you just want to access your cell array. load('vims.mat'); f{1}(2,3) %first cell, row 2 c...

3 days ago | 1

| accepted

Answered
How to compare multiple variables against one and produce an answer for each comparison?
ON=5;BC=2;QC=4;AB=1; L=["ON","BC","QC","AB"];%put names in string array r=[ON,BC,QC,AB];%put all variables into a single array...

4 days ago | 0

Answered
Read nth image from a folder and compare it with nth image from different folders and store the result
a=dir('F1/');b=dir('F2/');c=dir('F3/'); for k=1:length(a.name) i1=imread([a(k).folder,'/',a(k).name]); i2=imread([b(k...

4 days ago | 0

Solved


Digits of Powers of 2
In Project Euler Problem #16, we are asked for sum of the digits of powers of 2. Here we will be asked for more than that. Give...

4 days ago

Answered
How to assign sequence values to an specific column of a table?
size = [720 4]; Type = ["double","double","double","double"]; Names = ["Hours","PrEV","SoCEV","Gen"]; master = table('Size',s...

4 days ago | 0

Load more