A résolu


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

environ 2 mois il y a

A résolu


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

environ 2 mois il y a

A résolu


Return part of an array
Given a 5x5 array, return a 3x3 array that contains the cells that are not on the edge of the array: Given this array Return...

environ 2 mois il y a

A résolu


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

environ 2 mois il y a

A résolu


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

environ 2 mois il y a

A résolu


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

environ 2 mois il y a

A résolu


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

environ 2 mois il y a

A résolu


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

environ 2 mois il y a

A résolu


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

environ 2 mois il y a

A résolu


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

environ 2 mois il y a

A résolu


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

environ 2 mois il y a

A résolu


Find 10's complement
Find 10's complement of a given number. An example is <http://electrical4u.com/9s-complement-and-10s-complement/ shown here>.

environ 2 mois il y a

A résolu


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

environ 2 mois il y a

A résolu


Compute Airspeed from Mach Number
Write a MATLAB function that converts a Mach number to airspeed given the speed of sound aa in m/s: V=M⋅a V = airspeed (m/s) M...

environ 2 mois il y a

A résolu


You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

environ 2 mois il y a

A résolu


Create an array (n,n) where only diagonal elements are '1' and others are '0'
Create an array (n,n) where only diagonal elements are '1' and others are '0' EX: n = 3; then Resultant array would be [ 1 0...

environ 2 mois il y a

A résolu


mathematics , probability problem
How many different result can we have, rolling k dice?

environ 2 mois il y a

A résolu


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

environ 2 mois il y a

A résolu


Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

environ 2 mois il y a

A résolu


Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

environ 2 mois il y a

A résolu


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

environ 2 mois il y a

A résolu


lb to kilogram
convert lb to kilogram units, easy

environ 2 mois il y a

A résolu


Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.

environ 2 mois il y a

A résolu


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

environ 2 mois il y a

A résolu


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

environ 2 mois il y a

A résolu


Sum of integers numbers
Sum of the numbers from 1 to 100

environ 2 mois il y a

A résolu


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

environ 2 mois il y a

A résolu


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

environ 2 mois il y a

A résolu


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

environ 2 mois il y a

A résolu


Solve for factorial of X
It gives you the number x, and set y equal to x factorial. Ex. There are 52 cards in a deck, each specific order of all 52 car...

environ 2 mois il y a

Charger plus