# David Hill

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

Working as Undergraduate Research Assistant in the field of Computational Photonics

**Statistics**

RANK**47**

of 239,690

REPUTATION**3,116**

CONTRIBUTIONS

**0** Questions

**1,311** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**331**

RANK**3,570** of 16,832

REPUTATION**369**

AVERAGE RATING**4.80**

CONTRIBUTIONS**18** Files

DOWNLOADS **113**

ALL TIME DOWNLOADS**2614**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

how do i write this in matlab?

syms x i=0:.1:1; for k=0:10 for j=1:11 K(j,k+1)=int(euler(k,x),x,[0,i(j)]); end end K=double(K);

9 hours ago | 0

| accepted

Solved

Cancel Middle

Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

12 hours ago

Solved

Find the nth composite number.

Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

12 hours ago

Solved

Get to a number faster.

If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

12 hours ago

How to reverse a Ax=b system of equation to find an A value from a x and b value

R1=4000; R2=8000; syms R3; R4=2000; R5=5000; v=125; A=[0 R2 0 R4 0 0 -R1 R2 -R3 0 0 0 0 0 R3 R4 -R5 0 1 1...

13 hours ago | 0

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

1 day 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] ) == [...

1 day 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 ...

1 day ago

How to calculate coefficient of variation for every element in Matrix?

cv=std(datan,0,'all')/mean(datan,'all');

1 day ago | 1

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

2 days ago | 1

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

2 days ago | 0

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)

2 days ago | 1

| accepted

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

2 days ago | 0

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

8 days 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...

9 days 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 ...

9 days 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...

19 days 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 ...

19 days 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...

19 days ago

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

20 days 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...

20 days 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) ...

20 days 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) ...

20 days ago

Solved

Which Prime

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

20 days 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 ...

20 days ago

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

21 days ago | 1

| accepted

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

21 days ago | 0

| accepted

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

21 days ago | 0

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

22 days ago | 1