Risolto


05 - Vector Equations 3
Define the vector _dVec_: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 10) ...

oltre 11 anni fa

Risolto


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

oltre 11 anni fa

Risolto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

oltre 11 anni fa

Risolto


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

oltre 11 anni fa

Risolto


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

oltre 11 anni fa

Risolto


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

oltre 11 anni fa

Risolto


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

oltre 11 anni fa

Risolto


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

oltre 11 anni fa

Risolto


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

oltre 11 anni fa

Risolto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

oltre 11 anni fa

Risolto


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

oltre 11 anni fa

Risolto


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Area of rhombus
Calculate the rhombus area

oltre 11 anni fa

Risolto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

oltre 11 anni fa

Risolto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

oltre 11 anni fa

Risolto


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

oltre 11 anni fa

Risolto


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

oltre 11 anni fa

Carica altro