Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

fast 6 Jahre vor

Gelöst


Negative matrix
Change the sign of all elements in given matrix.

fast 6 Jahre vor

Gelöst


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

fast 6 Jahre vor

Gelöst


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

fast 6 Jahre vor

Gelöst


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

etwa 6 Jahre vor

Gelöst


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 6 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

etwa 6 Jahre vor

Gelöst


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

etwa 6 Jahre vor

Gelöst


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

etwa 6 Jahre vor

Gelöst


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

etwa 6 Jahre vor

Gelöst


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

etwa 6 Jahre vor

Gelöst


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

mehr als 6 Jahre vor

Gelöst


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

mehr als 6 Jahre vor

Gelöst


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

mehr als 6 Jahre vor

Gelöst


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

mehr als 6 Jahre vor

Gelöst


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

mehr als 6 Jahre vor

Gelöst


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


give nth decimal place of pi
max 15th place after the decimal point is ok for now

mehr als 6 Jahre 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>.

mehr als 6 Jahre vor

Gelöst


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

mehr als 6 Jahre vor

Gelöst


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

mehr als 6 Jahre vor

Gelöst


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

mehr als 6 Jahre vor

Gelöst


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

mehr als 6 Jahre vor

Gelöst


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

mehr als 6 Jahre vor

Gelöst


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

mehr als 6 Jahre vor

Mehr laden