A résolu


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

environ un an il y a

A résolu


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=...

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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),....

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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 =...

environ un an il y a

A résolu


Draw a '8' in a zero matrix!

environ un an il y a

A résolu


Draw a '4' in a zero matrix!

environ un an il y a

A résolu


Draw a '9' in a zero matrix!

environ un an il y a

A résolu


Draw a '6' in a zero matrix!

environ un an il y a

A résolu


Draw a '7' in a zero matrix!

environ un an il y a

A résolu


Draw a '3' in a zero matrix!

environ un an il y a

A résolu


Draw a '2' in a zero matrix!

environ un an il y a

A résolu


Draw a '5' in a zero matrix!

environ un an il y a

A résolu


Draw a '1' in a zero matrix!

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


Mass Conversion 1

environ un an il y a

A résolu


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

environ un an il y a

A résolu


Energy Conversion 2

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

Charger plus