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

plus de 3 ans il y a

A résolu

Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

plus de 3 ans il y a

A résolu

Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

plus de 3 ans il y a

A résolu

Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

plus de 3 ans il y a

A résolu

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

plus de 3 ans il y a

A résolu

Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

plus de 3 ans il y a

A résolu

Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

plus de 3 ans il y a

A résolu

Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

plus de 3 ans il y a

A résolu

Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

plus de 3 ans il y a

A résolu

Given input in radians, output to degrees

plus de 3 ans il y a

A résolu

Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

plus de 3 ans il y a

A résolu

Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

plus de 3 ans il y a

A résolu

You just measured its surface area, that is the input.

plus de 3 ans il y a

A résolu

Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

plus de 3 ans il y a

A résolu

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

plus de 3 ans il y a

A résolu

Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

plus de 3 ans il y a

A résolu

Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

plus de 3 ans il y a

A résolu

Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

plus de 3 ans il y a

A résolu

Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

plus de 3 ans il y a

A résolu

Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

plus de 3 ans il y a

A résolu

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

plus de 3 ans il y a

A résolu

Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

plus de 3 ans il y a

A résolu

MATLAB Basic: rounding IV

plus de 3 ans il y a

A résolu

MATLAB Basic: rounding III

plus de 3 ans il y a

A résolu

MATLAB Basic: rounding II

plus de 3 ans il y a

A résolu

MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

plus de 3 ans il y a

A résolu

Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

plus de 3 ans il y a

A résolu

Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

plus de 3 ans il y a

A résolu

Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

plus de 3 ans il y a

A résolu

Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

plus de 3 ans il y a