Community Profile

photo

David Hill


484 total contributions since 2017

Contact

David Hill's Badges

  • Knowledgeable Level 2
  • First Answer
  • Creator
  • Leader
  • Computational Geometry II Master
  • Card Games Master
  • Introduction to MATLAB Master
  • Community Group Solver
  • Sequences And Series I Master
  • Indexing I Master
  • Number Manipulation I Master
  • Magic Numbers II Master
  • Tiles Challenge Master
  • Project Euler I
  • Functions I Master

View all

Contributions in
View by

Answered
Create a matrix from some given matrices
As long as the size of matrices A,B,and C are the same, creating new matrix as listed above is as simple as the following. newM...

circa 13 ore ago | 0

Answered
find magnitude of approximate percent relative error
a=(-1).^k.*(x.^(2*k+1)./factorial(2*k+1)); MagTrueerr=abs(cumsum(a)-f_exact); MAPRE=100*MagTrueerr./cumsum(a); No loops neede...

1 giorno ago | 0

Answered
function results into a vector
You just need a dot! Vreg = [(230-(VL))./(VL)];

1 giorno ago | 0

Answered
Adding number in a sequence
movsum(jj,2);

2 giorni ago | 0

Answered
How tatement to use if statement to eliminate unwanted value
m=max(i(i~=Inf));

2 giorni ago | 0

| accepted

Answered
HOW TO get answer in 6 decimal places .
format long

2 giorni ago | 0

| accepted

Answered
I can't figure out this matlab function that returns the exponential of each element
function ex = seriesExp(x) i=0:9; ex=arrayfun(@(x)sum(x.^i./factorial(i)),x); end

2 giorni ago | 0

Answered
how to remove the error showing undefined function or variable
Preallocate X1 before the loop. X1=zeros(m1*k2,n1);

2 giorni ago | 0

| accepted

Answered
How do I calculate the square of TStep5 divided by the average of TStep4 and TStep2?
TStep5^2/mean([TStep4,TStep2]); If you explained what you really what to do, it would be easier to help. There is likely a must...

2 giorni ago | 0

Answered
How do I find the sum of two vectors?
Row + Step;

2 giorni ago | 0

Answered
How would I convert this equation to code? My likely flawed coding is below. Thanks!
Assuming L and T are vector arrays of equal length and all others are defined constants. es=e0*exp((L/rv).*(1/t0 - 1./T));

2 giorni ago | 0

Answered
How can I create multiple arrays, based on unique column values, from a single array?
For your array x: function Plot(x) hold on; z=x(:,1); arrayfun(@(y)plot(x(ismember(z,y),3),x(ismember(z,y),2),'Marker','*','...

3 giorni ago | 0

Answered
backward recurssion in a loop
c=zeros(9,20); c(9,:)=b(9,:)-a(9,:); for i=8:-1:1 c(i,:)=c(i+1,:)-a(i,:); end

3 giorni ago | 0

| accepted

Answered
help plotting basic x vs y?
x =linspace(0,L,100); y =w0./(120*E*I*L)*(-5*x.^4+6*L^2*x.^2-L^4); plot(x,y);

3 giorni ago | 0

| accepted

Answered
correlation coefficients for a matrix that includes NaNs
[R,P]=corrcoef(rmmissing(PK6mab)); If you can tolerate deleting the entire rows of any missed data.

3 giorni ago | 0

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

3 giorni ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

3 giorni ago

Answered
Sorting Prime Numbers From an Array of Numbers, Into a New Array
Why not use the primes function? NN=primes(100);

3 giorni ago | 0

Answered
Return if No Solution
If A will always be a square matrix, then if the det(A)==0 then return (no solution).

10 giorni ago | 0

Solved


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

10 giorni ago

Solved


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

10 giorni ago

Solved


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

10 giorni ago

Solved


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

10 giorni ago

Solved


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

10 giorni ago

Solved


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

10 giorni ago

Solved


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

10 giorni ago

Solved


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

10 giorni ago

Load more