Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

11 Monate vor

Gelöst


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

11 Monate vor

Gelöst


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

11 Monate vor

Gelöst


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

11 Monate vor

Gelöst


Swap between first and last column
The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

11 Monate vor

Gelöst


Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

11 Monate vor

Gelöst


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

11 Monate vor

Gelöst


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

11 Monate vor

Gelöst


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

11 Monate vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

11 Monate vor

Gelöst


factorial of a number x
Factorial of a number x

11 Monate vor

Gelöst


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

11 Monate vor

Gelöst


reverse string
input='rama' output='amar'

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

11 Monate vor

Gelöst


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

11 Monate vor

Gelöst


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

11 Monate vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Remove the Zero
Given an array n, remove all zeros

11 Monate vor

Gelöst


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

11 Monate vor

Mehr laden