Community Profile

photo

David Hill


Last seen: Today Active since 2017

Electrical Engineering with minors in Computer Science, Mathematics, and Creative Writing.

Working as Undergraduate Research Assistant in the field of Computational Photonics

Statistics

All
  • 24 Month Streak
  • Revival Level 2
  • Sequences And Series II Master
  • Cody5 Easy Master
  • 5-Star Galaxy Level 3
  • Personal Best Downloads Level 3
  • Number Manipulation II Master
  • Draw Letters
  • Cody Problems in Japanese Master
  • Cody Challenge Master
  • Computational Geometry I Master
  • Famous

View badges

Content Feed

Solved


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

alrededor de 19 horas ago

Solved


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

alrededor de 20 horas ago

Solved


Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4 S = [1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 ...

alrededor de 20 horas ago

Answered
How to calculate coefficient of variation for every element in Matrix?
cv=std(datan,0,'all')/mean(datan,'all');

alrededor de 21 horas ago | 1

Answered
Save vales in Harry in a for loop
No loop needed. Ri_A=numbA_IntStat./(E_i.*cos(numbGrad).*ds);%assuming all the same sized variables

1 día ago | 1

Answered
how can i integrate a function which has three variables but has to integrate it with respect to only one variable
For example: syms a b d e t; f=d^2*cos(e)/exp(t); I=int(f,e,a,b);

1 día ago | 0

Answered
Surface plot from excel data
a=readmatrix('test1.xlsx'); x=a(1,2:end); y=a(2:end,1); z=a(2:end,2:end); [X,Y]=meshgrid(x,y); surf(X,Y,z)

1 día ago | 1

| accepted

Answered
I'm new in matlab and I'm having trouble with the coding
x=(2*s*(4*s^2+19*s+20))/(20*s^4+66*s^3+73*s^2+57*s+30);%s is scalar x=(2*s.*(4*s.^2+19*s+20))./(20*s.^4+66*s.^3+73*s.^2+57*s+30...

1 día ago | 0

Answered
Multiply each element of a matrix by different element from another matrix
massg=10^-5:10; %mass [g] mass=massg/1000; %mass [kg] Ra_leo=2000; Ra_geo=35786; % altitude[km] R=6378; %Radius of Earth [km]...

7 días ago | 0

Solved


Method of Common Differences part-2
This is the inverse problem to <http://www.mathworks.com/matlabcentral/cody/problems/1485 Problem 1485>. Problem 1485 illustra...

8 días ago

Solved


Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

8 días ago

Solved


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

18 días ago

Solved


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '1' and 0.(x is odd and bigger than 4) Example x=5 ans = [1 1 1 1 ...

18 días ago

Solved


Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

18 días ago

Answered
Improving the speed of a double for loop through vectorization or changing summation indices
What is rep doing? Seems to just be multiplying. for rep = 1:10000 for p=0:N_M_min for q=0:p coeff(p+1) = coeff(...

19 días ago | 0

Solved


List Honaker primes
The number 131 is the 32nd prime number. It is a Honaker prime because the sum of its digits (1+3+1) equals the sum of the digit...

19 días ago

Solved


Hoax Numbers
A Hoax Number (OEIS A019506) is defined as a composite number, whose sum of digits is equal to the sum of digits of its distinct...

19 días ago

Solved


Palindromic Prime
Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) If given a monotonic series (increment=1) ...

19 días ago

Solved


Bessel Polynomials
Return the n-th Bessel polynomial Assume that n is a non-negative finite integer. bessel_poly(0) ans = 1 bessel_poly(1) ...

19 días ago

Solved


Which Prime
Given two prime numbers, specify the relation between them i.e. - 'Twin Prime', 'Cousin Prime', 'Sexy Prime' or 'None'

19 días ago

Solved


Generate a matrix as follows
write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

19 días ago

Answered
A simple rout algorithm in finding the way from point (0,0) to a random point (x1,y1) in a block
I would use a graph. M=zeros(100);%adjacency matrix start r=randperm(100,11);%ten random nodes with last node the end point e...

20 días ago | 1

| accepted

Answered
How to use multiple break statments
for i = 1:100 if ~(sln2.Error<=1) Ext.W22=beta*Ext.W22; Ext.W22List(i) = Ext.W22; end sln3.Erro...

20 días ago | 0

| accepted

Answered
Find minimum and maximum from same matrix
m=yourMatrix; m(m<=0)=inf; Min=min(m,[],'all'); m=yourMatrix; m(m>=0)=0; Max=-max(abs(m),[],'all');

20 días ago | 0

Answered
Find Consecutive numbers and print value in next collumn
Simple loop works c=0; f(:,6)=0; for k=1:size(f,1) if f(k,5)==1 c=c+1; f(k,6)=c; else c=0; end end

21 días ago | 1

Answered
Check every element of an array with if statement
z = [0.2+(-500:.05:500)*1i]; R = (z-1)./(z+1); x = abs(R); idx=x<=1; plot(real(R(idx)),imag(R(idx)),'b'); title('R Pla...

21 días ago | 0

| accepted

Answered
Producing all combinations of a vector with replacement
[x,y]=meshgrid(1:4); z=unique(sort([x(:),y(:)],2),'rows');

21 días ago | 1

| accepted

Solved


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

alrededor de 1 mes ago

Solved


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

alrededor de 1 mes ago

Solved


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

alrededor de 1 mes ago

Load more