Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

1 year ago

Solved


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

1 year ago

Solved


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

1 year ago

Solved


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

1 year ago

Solved


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

1 year 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 ...

1 year ago

Solved


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

1 year ago

Solved


Draw a '8' in a zero matrix!

1 year ago

Solved


Draw a '4' in a zero matrix!

1 year ago

Solved


Draw a '9' in a zero matrix!

1 year ago

Solved


Draw a '6' in a zero matrix!

1 year ago

Solved


Draw a '7' in a zero matrix!

1 year ago

Solved


Draw a '3' in a zero matrix!

1 year ago

Solved


Draw a '2' in a zero matrix!

1 year ago

Solved


Draw a '5' in a zero matrix!

1 year ago

Solved


Draw a '1' in a zero matrix!

1 year ago

Solved


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

1 year ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

1 year 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 number of...

1 year ago

Solved


Linear Motion 4
A robot accelerates at a rate of A ft/s2. Assuming the robot starts from rest how much time is required to reach an object loca...

1 year ago

Solved


Linear Motion 3
Suppose a robot is moving in a straight line and steadily increases its speed. It moves from v1 ft/s to v1+2 ft/s in the first ...

1 year ago

Solved


Linear Motion 2
During testing in the desert, a remotely operated vehicle travels D kilometers over rough terrain. The testing takes place over...

1 year ago

Solved


Linear Motion 1
An object travels N feet in the first second of travel, N feet again during the second second of travel and N feet again during ...

1 year ago

Solved


Magnitude of Balancing Force
A box weighing W1 pounds is placed where its center of mass is located d1 ft from the fulcrum. A balancing force is placed at th...

1 year ago

Solved


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

1 year ago

Solved


Mass Conversion 1

1 year ago

Solved


Resistance of a light bulb
The current through two identical light bulbs connected in series is C Amperes. The total voltage across both bulbs is V Volts....

1 year ago

Solved


Energy Conversion 2

1 year ago

Solved


Calculate Parallel Resistance
Three resistors connected in parallel have resistances R1, R 2, and R 3, respectively. Return the total resistance R total of ...

1 year ago

Solved


Current through resistor
Three resistors (R2, R3, R4) are connected in parallel as shown in the figure. If this combination is connected in series with ...

1 year ago

Load more