A résolu


Binary Coder
Take an input number and print the binary value of this number.

presque 5 ans il y a

A résolu


Calculate volume of box
Calculate the volume of box,hiven its sides

presque 5 ans il y a

A résolu


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

presque 5 ans il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

presque 5 ans il y a

A résolu


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

presque 5 ans il y a

A résolu


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

presque 5 ans il y a

A résolu


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

presque 5 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

presque 5 ans il y a

A résolu


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

presque 5 ans il y a

A résolu


Area of rhombus
Calculate the rhombus area

presque 5 ans il y a

A résolu


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

presque 5 ans il y a

A résolu


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

presque 5 ans il y a

A résolu


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

presque 5 ans il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

presque 5 ans il y a

A résolu


Find the largest number
Given a vector v with 4 elements, find the largest number x. Example: Input: v = [4 7 1 6]; Output: x = 7; You mu...

presque 5 ans il y a

A résolu


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

presque 5 ans il y a

A résolu


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

presque 5 ans il y a

A résolu


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

presque 5 ans il y a

A résolu


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

presque 5 ans il y a

A résolu


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

presque 5 ans il y a

A résolu


square root
Find the square root (y) of an input (x).

presque 5 ans il y a

A résolu


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

presque 5 ans il y a

A résolu


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

presque 5 ans il y a

A résolu


Calculate square and cube of number
Calculate square and cube of number x

presque 5 ans il y a

A résolu


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

presque 5 ans il y a

A résolu


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

presque 5 ans il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

presque 5 ans 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...

presque 5 ans il y a

A résolu


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

presque 5 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

presque 5 ans il y a

Charger plus