Gelöst


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

etwa 18 Stunden vor

Gelöst


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

etwa 18 Stunden vor

Gelöst


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

etwa 18 Stunden vor

Gelöst


Determine the length of a string of characters
Determine the length of a string of characters

etwa 18 Stunden vor

Gelöst


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

etwa 18 Stunden vor

Gelöst


07 - Common functions and indexing 2
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Calculate eMean as the mean across the rows of _eMat_. The an...

etwa 18 Stunden vor

Gelöst


07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

etwa 18 Stunden vor

Gelöst


07 - Common functions and indexing 1
Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

etwa 18 Stunden vor

Gelöst


07 - Common functions and indexing 4
Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

etwa 18 Stunden vor

Gelöst


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

etwa 18 Stunden vor

Gelöst


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

etwa 18 Stunden vor

Gelöst


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

etwa 18 Stunden vor

Gelöst


Values in Array
How many values are in the array

etwa 18 Stunden vor

Gelöst


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

etwa 18 Stunden vor

Gelöst


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

etwa 18 Stunden vor

Gelöst


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

etwa 18 Stunden vor

Gelöst


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

etwa 18 Stunden vor

Gelöst


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

etwa 18 Stunden vor

Gelöst


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

etwa 18 Stunden vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

etwa 18 Stunden vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

etwa 18 Stunden vor

Gelöst


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

etwa 18 Stunden vor

Gelöst


Linear Motion 1
An object travels N feet in the first second of travel, N feet again during the second second of travel and N feet again during ...

etwa 18 Stunden vor

Gelöst


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

etwa 18 Stunden vor

Gelöst


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

etwa 18 Stunden vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

etwa 18 Stunden vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

etwa 18 Stunden vor

Gelöst


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

etwa 18 Stunden vor

Gelöst


An array is given that contains the marks. Find out the highest 3 marks
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

etwa 19 Stunden 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...

etwa 19 Stunden vor

Mehr laden