Community Profile

photo

David Hill


637 total contributions since 2017

Contact

David Hill's Badges

  • Knowledgeable Level 3
  • Revival Level 1
  • First Answer
  • Puzzler
  • Scholar
  • Creator
  • First Review
  • First Submission
  • Leader
  • Computational Geometry II Master
  • Card Games Master
  • Introduction to MATLAB Master
  • Community Group Solver
  • Sequences And Series I Master
  • Indexing I Master

View all

Contributions in
View by

Answered
Building Function for Percentage
function pD = percentDiff(limit,speedM) pD=100*(speedM-limit)/limit; end Not sure what you want for good percentage differenc...

environ 2 heures ago | 0

Solved


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

environ 5 heures ago

Solved


counting for loop
Complete the function below using a for loop to count from 3 to N by 2. For example, if N is 10, count 3, 5, 7, 9 and stop. Fo...

environ 5 heures ago

Solved


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

environ 5 heures ago

Solved


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

environ 5 heures ago

Solved


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

environ 5 heures ago

Answered
Finding max value from one dimensional matrix
max(A(5:end));

environ 5 heures ago | 0

| accepted

Answered
output arguments not assigned
Because 'day' is the input variable, it is present in the function and will be passed to the output. the 'outcome' variable is n...

environ 20 heures ago | 0

Answered
How do I replace multiples of 4 with a 0 in a magic 4 matrix?
a=magic(4); a(mod(a,4)==0)=0;

environ 21 heures ago | 0

Answered
How to smooth an airfoil given through a set of points ?
airfoil=fit(x,y,'smoothingspline'); plot(airfoil);

environ 22 heures ago | 0

Answered
Sum of near infinite series?
p=[]; for i=1:2:n+1 p=[p,(n+1)/n,(n+1)/(n+2)]; end P=prod(p(1:n));

1 jour ago | 0

Answered
how do I make an array where the value increases by a factor of 10?
x=10.^(-5:4); y=280*((x./200).^(0.2)+1); semilogx(x,y);

1 jour ago | 0

Answered
how to sum matrices in a for loop
I assume you just want to add the calculated x-matrix with itself during each loop iteration. x=zeros(2); for i=1:4 for j...

1 jour ago | 0

| accepted

Answered
Determine whether file value is within certain integer of an array value
Load text into a variable say T and make sure it is a number. if sum(my_array>(T-10)&my_array<(T+10))%repeat for as many files ...

1 jour ago | 0

Answered
Need help using the for loop
Not sure why you have to use a for-loop. function dataSamples = adjustMinValue(dataSamples,minValue) for i=1:length(dataSample...

1 jour ago | 0

Answered
Time table code using while loops
Not sure why you have to use a while loop. function T = timesTable(n) T=1:n; count=2; while count<=n T(count,:)=count*T...

1 jour ago | 0

Answered
How do I turn two columns into one row?
If a cell array, a={'a' 1;'b' 2;'c' 3;'d' 4}; b=a'; c=b(:)';%should give up the cell array in the format you desire

2 jours ago | 1

| accepted

Answered
Error massage in Euler method
Array indexes start at one not zero for MATLAB. You cannot index into an array at zero. Just start your array indexing at one in...

2 jours ago | 0

| accepted

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

3 jours ago

Solved


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

3 jours ago

Answered
Creating a new matrix from an existing one using logical operators?
x=randi([5 50],100,100); y=(x>=25).*x;

4 jours ago | 0

Answered
how can i convert 1xn to mxn matrix ?
Look at rand or randi functions. Depending on what range you want your randon numbers to be in, either function could be used. ...

4 jours ago | 0

Solved


All flights lead to Idaho Falls
Using spherical trigonometry and great circle paths, determine the distance (in kilometers) and the initial flight heading (from...

4 jours ago

Problem


All flights lead to Idaho Falls
Using spherical trigonometry and great circle paths, determine the distance (in kilometers) and the initial flight heading (from...

4 jours ago | 0

Answered
to plot a introduced function
J=-1:.1:1; d=0:.1:5; [J,d]=meshgrid(J,d); Z=zeros(size(J)); for i=1:size(J,1) for j=1:size(J,2) Z(i,j)=C(J(i,j...

4 jours ago | 0

| accepted

Solved


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

11 jours ago

Solved


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

11 jours ago

Solved


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

11 jours ago

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

11 jours ago

Solved


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

11 jours ago

Load more