Gelöst


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

6 Monate vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

6 Monate vor

Gelöst


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

6 Monate vor

Gelöst


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

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

6 Monate vor

Gelöst


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

6 Monate vor

Gelöst


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

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

6 Monate vor

Gelöst


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

6 Monate vor

Gelöst


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

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

6 Monate vor

Gelöst


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

6 Monate vor

Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

6 Monate vor

Gelöst


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

6 Monate vor

Gelöst


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

6 Monate vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

6 Monate vor

Gelöst


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

6 Monate vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

6 Monate vor

Gelöst


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

6 Monate vor

Gelöst


06 - Matrix Equations 1
Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

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

6 Monate vor

Gelöst


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

6 Monate vor

Gelöst


Array of Ones
Create a 100 X 100 array of ones.

6 Monate vor

Gelöst


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

6 Monate vor

Mehr laden