Community Profile

photo

David Hill


Last seen: Today Active since 2017

Electrical Engineering with minors in Computer Science and Mathematics. Working as Undergraduate Research Assistant in the field of Computational Photonics

Programming Languages:
Python, C++, C, Java, MATLAB, HTML, Arduino
Spoken Languages:
English, Spanish

Statistics

All
  • MATLAB Mini Hack Participant
  • Treasure Hunt Participant
  • 24 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


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

1 day ago

Answered
I have matrix K and Z
s=logical(sum(Z,2)); K(s,:)=0;

1 day ago | 0

Answered
Index exceeds the number of array elements - Error message
mdata = [1 2 3 4 5 6 7 8 9 10]; k = 1; c = 1; for n1 = 1:2:length(mdata) ma(c) = (1/(k + 1)) * sum(mdata(n1:n1 + k))...

2 days ago | 0

Solved


Convert single-precision floating-point number to binary representation
Write a function which takes a scalar <http://en.wikipedia.org/wiki/Single-precision_floating-point_format single-precision floa...

2 days ago

Solved


Convert base 10 to base x (2-16)
Convert input number(s) (cell array of character arrays) in base 10 to base x (2 through 16). Output should be a cell of charact...

3 days ago

Answered
Finding the max value in 1st column of values based on a range in the 2nd column of values
idx=(FFTDataCKASRoll(:,2)>=.09&FFTDataCKASRoll(:,2)<=.11)|... (FFTDataCKASRoll(:,2)>=.19&FFTDataCKASRoll(:,2)<=.21)|... ...

3 days ago | 0

| accepted

Answered
How to averaging each each row in cell array?
d=cell2mat(dst_allfiles); m=mean(d,2);

3 days ago | 0

| accepted

Answered
What is the best way to define an output vector in this case?
I assume you mean a 10-element vector. for k=1:1000 yourVector=;%computation to compute your vector yourMatrix(k,:)=y...

12 days ago | 0

| accepted

Answered
Why does matlab not evaluate equations properly?
syms x f=log(.7*x+.5); x0=4.2857; t=taylor(f,x,x0,'Order',2); a= double(subs(t,6.42855))

12 days ago | 0

| accepted

Answered
why do I get the wrong angle
Recommend avoiding using symbolics. Seeking numerical solution, use fzero. mo=2.5; y=1.4; angle=10; fun=@(a)((2*(1+((y-1)/2)...

18 days ago | 0

Answered
why I get imaginary part using solve function
y=1.4; to3=300; t_star=400; eq4=@(m4)(((2*(y+1)*m4^2*(1+(y-1)/2)*m4^2))/(1+y*m4^2)^2)-to3/t_star; m_4=fzero(eq4,.8)

18 days ago | 0

Answered
Append values of nested loop into matrix
r=readmatrix('data_jong_edit.txt'); r(isnan(r(:,1)),:)=[]; u=unique(r(:,1)); for k=1:length(u) re=r(r(:,1)==u(k),:); ...

19 days ago | 0

Answered
why my plots are getting replaced after every simulation?
Question is confusing on figure numbering. Below saves 48 figures (16 each of s1, s2, and s3). Since you are saving the figures,...

19 days ago | 0

Answered
How to duplicate some values in vector , while each value is duplicate in different number of times?
a=[1 0 2 0 3 0 3 0]; d=4*(a>0)+3*(a==0); n=repelem(a,d);

19 days ago | 0

Answered
Why am I getting error "Vectors must be the same length" although they are of same length?
You have two 'Trial40' plot(subject_data.xcoordinates2{find(subject_data.trialname == 'Trial40',1)}, ... subject_data.ycoo...

19 days ago | 1

Answered
How to determine the reverse saturation current
missing * and some () in last equation N_a=1.0*10^22; N_d=1.0*10^22; ni=1.5*10^16; D_n=0.0025; tao_p0=5*10^(-7); tao_n0=5*...

20 days ago | 0

Answered
Single bit read returning invalid precision
b=fread('a.wdq',1,'ubit1');%this does not work?

20 days ago | 0

Answered
Matlab: How to plot the function $P(x)$ versus $x$, where $P(x)=\int_0^\infty f(y)W(x,y)dy$?
y=1:.01:5; x=0:.01:7; [X,Y]=meshgrid(x,y); W=exp(-X.^2./Y); f=y.^2;%as an example I=trapz(W.*f')/.01;%each column of I is t...

20 days ago | 0

Answered
How to find elements in common between two cell arrays?
load('B_90.mat'); A=B; load('B_120.mat'); I=intersect(A{1},B{1},'rows');%as an example points in common between A{1} and B{1}...

20 days ago | 1

| accepted

Answered
MATRIX PROBLEM IN MATLAB
You are indexing into regime with an array (aa) which is 1:2. Not sure what you want array (aa) to be: j=1:3; aa=1:(j+1);%this...

20 days ago | 0

| accepted

Answered
Writing a summation code where i≠j
No loops needed G=sum(w.*x.*x','all')/sum(x.*x','all');

23 days ago | 0

Answered
How do I replace every value in a column with a value from a lookup table?
interp1(X,Y,A)

23 days ago | 0

| accepted

Answered
how to I write sqrt{x}+sqrt{1+x}=4 in mathlab
eqn=@(x)sqrt(x)+sqrt(1+x)-4; f=fzero(eqn,3)

24 days ago | 0

| accepted

Answered
Randomly choose one nonzero element in each row of matrix
Need a single loop in third dimension. ex=randi(2,10,17,12)-1; E=permute(ex,[2,1,3]); [r,c]=find(E); N=zeros(size(ex,1),1,si...

24 days ago | 0

| accepted

Answered
How to write the program for pick the first five element from an array than next five and store their individual sum in new array?
a=randi(100,1,50);%an array n=sum(reshape(a,5,[]));%sum of 5 elements placed in new array

25 days ago | 0

| accepted

Answered
string text manipulation - adding data based on previous data in the string
m=replace(m,'element1','element1CMD'); m=replace(m,'element2','element2CMD'); m=replace(m,'element3','element3RPT');

1 month ago | 0

Answered
The graph is coming out blank
Index and plot after completion of loop. f=@(x,y) -y/.1; x=input('\n Ingrese el valor inicial de x0: '); y=input('\n Ingres...

1 month ago | 1

Solved


Determine whether a number is practical
A number is practical if all smaller numbers can be written as a sum of the proper divisors of . The number 24 is practical bec...

1 month ago

Solved


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

1 month ago

Load more