Community Profile # 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
• • • • • • • • • • • • #### Content Feed

View by

For loop in matlab
Not sure what you are trying to do. You don't use several variables. Why use symbolic? n=10^6; R=0.30; l=0.1; d=0.05; fo...

alrededor de 3 horas ago | 0

| accepted

what does the "oldx =[x(n);oldx(1:256)]" in the following programm do?
for n = 1: 256000 oldx =[x(n);oldx(1:255)];%just reforming the oldx array with x(n) on top and then the next 255 elements of ...

alrededor de 4 horas ago | 0

| accepted

Count rows in a table that contain specific letters

alrededor de 4 horas ago | 0

summations and selections of the columns of a matrix
newMatrix=[yourMatrix(1,:);flipud(cumsum(flipud(yourMatrix(2:end,:))))];

alrededor de 7 horas ago | 0

| accepted

How can i solve this problem
Show me what you have tried for the C(k) equation above. function C= FourierSeries(x,MaxK) N=length(x); n=0:N-1; for k=1:2*M...

alrededor de 8 horas ago | 0

I am unsure of how I am getting this error
r=linspace(0.001,1,1000); s=0.75*((r.^3)./(exp(1).^(.75*r)));%error is here (multiplying by scalar does not need .*, but you ne...

alrededor de 23 horas ago | 0

make a matrix of values from questions from another matrix

alrededor de 23 horas ago | 0

| accepted

For loop and matrices w/ different elements?
B(i)=[m2.*A2x(i); m2.*A2y(i); I2*a2; m3*A3x(i); m3*A3y(i); I3*a3(i); m4*A4x(i)-F4x(i); 0];%ne...

1 día ago | 0

| accepted

How to code with for loop loops without using ndgrid?
count=0; for c=5:6 for b=3:4 for a=1:2 count=count+1; d(count,:)=[a,b,c]; end ...

1 día ago | 0

How to divide a vector into small groups
x=randi(100,30,1); X=reshape(x,2,[]); [~,idxGroup]=find(X==x(15));

1 día ago | 0

| accepted

Extracting the sub-matrix
A = [1 2 3; 4 5 6; 7 8 9]; B=A(1:2,2:3); E=blkdiag(zeros(2),A);

1 día ago | 1

| accepted

plotting a 2-colum 2d array
plot(a(:,1),a(:,2));

11 días ago | 1

Not enough Input arguments in integral function
s=0:100; for t=1:numel(s) fun_W=@(k)real(c_k(k))./k.*sin(k*s(t)); W(t)=2/pi*integral(fun_W,0,Inf); end fu...

13 días ago | 1

| accepted

Solved

Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

14 días ago

Solved

Count given word x in text.
Count how many times given word x repeats in text.

14 días ago

Solved

Opposite task convert string hexadecimal numbers array into array of decimal numbers .
Opposite task convert string hexadecimal numbers array into array of decimal numbers . Example x=[ '208'; '209'; '20A'; ...

14 días ago

Solved

Opposite task convert binary numbers array into array of decimal numbers.
Opposite task convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ...

14 días ago

Solved

Solve expression II
Solve given expression. alpha=0.1(-x-y-50)/(exp((-x-y-50)/10)-1) beta=5exp((-x+y-60)/20) result=alpha+beta;

14 días ago

Solved

Convert array of decimal numbers into binary numbers array.
Convert an array of decimal numbers into binary numbers array. For example: x = [1 2 3 4 5 6 7 8]; result = [1; 10; 11;...

14 días ago

Solved

Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. For example, for n=5: HilbertMatrix = [1.0000 0.5000 0.333...

14 días ago

Solved

Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

14 días ago

Solved

Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

14 días ago

How can I sum each 3 columns array?
m=movsum(x,3); y=m(:,1:3:end);

14 días ago | 1

| accepted

Cropping images around the center of an image with a particular size

14 días ago | 0

Too many for loops, how to approach rearranging arrays problem differently?
a=1:10; b=10:19; sa=0;sb=0; for k=2:numel(a) sa=sa+sum(nchoosek(a,k),'all'); sb=sb+sum(nchoosek(b,k),'all'); end

14 días ago | 0

How can I fix random numbers in a for loop?
t=1:.1:10; for k=1:10 s1=randi(5)*sin(1*t)+randi(5)*sin(2*t); s2=randi(5)*sin(1*t)+randi(5)*sin(2*t); Diff(k)=(s1-s2); e...

14 días ago | 1

| accepted

Solved

Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.

16 días ago

Solved

Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

16 días ago

Solved

Distance between two GPS Coordinates
A problem that arises when performing geographically weighted regression is determining the distance between GPS coordinates. GI...

16 días ago

Solved

Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

16 días ago