Community Profile

photo

David Hill


708 total contributions since 2017

Contact

David Hill's Badges

  • 3 Month Streak
  • Knowledgeable Level 3
  • Revival Level 1
  • Puzzler
  • Scholar
  • Creator
  • Personal Best Downloads Level 2
  • First Review
  • First Submission
  • Leader
  • Computational Geometry II Master
  • Card Games Master
  • First Answer
  • Introduction to MATLAB Master
  • Community Group Solver

View all

Contributions in
View by

Answered
Array indices must be positive integers or logical values.
clc; omega=2*pi*10; t=0:0.001:10; f=0:0.1:500; for n=1:length(t) y(n)=sin(omega*t(n)); end spectrum=abs(fft(y));%does...

circa 2 ore ago | 1

Answered
How can I select y data given a certain x value?
AA_Zn1=Zn1_data(:,1).*(Zn1_data(:,1)==-1.7001|Zn1_data(:,1)==-1.70007);

circa 5 ore ago | 0

Answered
Please read the instructions and give the correct expression
Hint T=[A,2*B,3*B+E;F-2*B,C,D];

circa 7 ore ago | 0

Answered
how to sum first 140 elements every time in an (1 * 21000) array
b=sum(reshape(a,[140,150]));

circa 7 ore ago | 0

Answered
How to concatenate several matrix into one
newMatrix=horzcat(a,b,c,d,e,...);

4 giorni ago | 0

| accepted

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

4 giorni ago

Submitted


secp256k1 Elliptic Curve Shared-Key Generation GUI
Elliptic Curve Cryptography using secp256k1. Generates private-key times a given point (input) that is on the elliptic curve.

5 giorni ago | 2 downloads |

Thumbnail

Solved


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

5 giorni ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

5 giorni ago

Solved


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

5 giorni ago

Solved


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

5 giorni ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

5 giorni ago

Solved


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

5 giorni ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

5 giorni ago

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

5 giorni ago

Answered
Plotting Infinite series in matlab
You can plot for various values of t between 0 and 1. t=.3%not sure what you want to plot against, I held t constant and plotte...

6 giorni ago | 0

| accepted

Answered
calling a function in a loop
Easier without for-loop. I agree with the comment above, without setting i=0 (initially), I believe it was causing your problem....

6 giorni ago | 0

Answered
Writing Code for Function
function yn=insideBounds(P,r) pgon=polyshape(r(:,1),r(:,2)); yn=isinterior(pgon,P); end

6 giorni ago | 0

Answered
Linear best fit through specified y-axis intercept
f=fit(x,y,'poly1'); disp(f);%will display the linear model including the y-intercept and slope of the fitted line

6 giorni ago | 0

Answered
Solve an equation through iteration in Matlab
function b = Solution(a,b)%a and b must bound the solution (a=5.2, b=5.3) f=@(x)x^4+x-750; while f(b)>.000001%whatever accurac...

6 giorni ago | 0

Answered
Can someone tell me what is wrong with this?
function x = Minimum(tau,xx) x(1)=xx; x(2)=x(1)-tau*(2*x(1)-2); k=2; while abs(x(k)-x(k-1))>0.01 x(k+1)=x(k)-tau*(2*x(k...

6 giorni ago | 0

Answered
Multiplication in cell arrays
Or a simple loop. for i=1:408 PRECTOTCORR{i}=PRECTOTCORR{i}*result(i); end

7 giorni ago | 0

| accepted

Answered
Reading string within a string
b={sprintf('problem.%s',a),sprintf('problem1.%s',a)};

7 giorni ago | 1

| accepted

Answered
Array indices must be positive integers or logical values.ERROR
throuput1=(c*(B*log(1+SNIR)));%I think you left out a * (c*...) otherwise you are trying to index into c Also, log(0) will be ...

7 giorni ago | 0

Answered
How to store Values in a Loop?
for t=0:10 L = 3*cos(t); M = diag([L 5*cos(t) 7*cos(t)]); K = [12e5*cos(t) 18e5*cos(t) 34e5*cos(t);18e5*cos(t) 15...

8 giorni ago | 0

| accepted

Answered
Plotting a temperature Depth Profile
A = readmatrix('name.xls');%I will assume temperature is in the first column and depth in the second column B = readmatrix('nam...

8 giorni ago | 0

| accepted

Answered
I am trying to plot a function with iteration of a variable
Not sure what t is, but you do not need a for-loop. r = 0:.01:a; Vc = ((r.^2 - (a-d)^2)/(4*viscosity_c))*dpdz1; plot(Vc,r);

8 giorni ago | 0

Answered
How to store an x-y coordinate under one Variable
I really don't understand. How are your data points stored? Why is it easier with a single vector rather than two? You can alway...

8 giorni ago | 0

| accepted

Answered
How can I plot scatter graphs in a for loop?
Assume you have your data in a matrix, M. Assume you want a scatter plot of the column vs. mean of each column. scatter(1:size(...

8 giorni ago | 0

Solved


Calculate the square root of a number
Input a Output b = srt(a)

8 giorni ago

Load more