Community Profile

# David Hill

##### Last seen: Today
1,108 total contributions since 2017

View all

Contributions in
View by

Why Matlab does not plot "for loop" generated vector?
Best to use arrays/vectors. c=7; n=12; u=0:.1:n; hours = (2.3/c)*((u/c).^1.3).*exp(-(u/c).^2.3)*(1-0.09)*8760; plot(u,hours...

19 hours ago | 0

sum of real numbers up to n using recursive code
function x = t_sum(n) x=1; if n>1 x=n+t_sum(n-1);%recursive end

22 hours ago | 0

| accepted

Unsure what I did wrong
x=0:.01:2*pi; y=exp(1).^x; plot(x,y)

22 hours ago | 0

| accepted

Solved

Kolakoski Sequence
This is a modified version of the kolakoski sequence. Refer to the problem <https://www.mathworks.com/matlabcentral/cody/p...

22 hours ago

Solved

Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

1 day ago

Solved

length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

1 day ago

Solved

Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

1 day ago

Solved

Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

1 day ago

Solved

leap year
find the number of leap years within the given time interval

1 day ago

true airspeed of different level
I am not sure if this is what you are looking for. g=9.81; d=[1.0587,.8198]; S=12.203; m=1204; cl=linspace(.6,1.4,20); hol...

1 day ago | 0

how to plot below equation get a curve starting from 0 to 100?
n=2; m=0;%you can change m to get different sets of graphs lambda=0:800;%0-800 alpha=linspace(0,0.02,7);%0-.02 hold on for ...

1 day ago | 0

Solved

Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

1 day ago

How to modify and improve this for-loop that I wrote?
RMSE=arrayfun(@(x)sqrt(mean((newcell{x}.rrr24(:)-newcell{x}.PRECIP(:)).^2)),1:numel(newcell))'; CC=arrayfun(@(x)corr(newcell{x}...

1 day ago | 1

| accepted

Solved

check whether a number is a pentatope number
<https://oeis.org/A000332>

1 day ago

Solved

Wythoff Sequence
Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

1 day ago

Solved

remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

1 day ago

Solved

generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

1 day ago

Solved

Tribonacci Sequence
Generate the tribonacci sequence upto n

1 day ago

Solved

Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

1 day ago

Solved

Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

1 day ago

Solved

Gray code
Given a decimal number, convert it to its corresponding Gray code (see https://en.wikipedia.org/wiki/Gray_code). 8 -- 1100...

2 days ago

Solved

How many ways?
Create a program to determine in how many ways can a regular n-gon be divided into n-2 triangles?

2 days ago

Solved

Decimal to binary conversion (without using built-in function)
convert the given decimal number to its equivalent binary without using built-in function. * n=18 * out='10010'

2 days ago

Solved

Decimal Fraction to binary conversion
Given an fraction decimal number n, convert it to its equivalent binary number. If it is an infinite binary fraction, keep it...

2 days ago

Solved

N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

2 days ago

Solved

Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

2 days ago

getting data from structure
T=struct2table(S); out=T.speed(:,1);

2 days ago | 0

| accepted

Counting Repeated elements in an array.
nnz(ismember(A,B));

2 days ago | 0

| accepted

Solved

Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

2 days ago

Solved

Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

2 days ago