Resuelto


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

más de 3 años hace

Resuelto


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

más de 3 años hace

Resuelto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

más de 3 años hace

Resuelto


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

más de 3 años hace

Resuelto


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

más de 3 años hace

Resuelto


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

más de 3 años hace

Resuelto


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

más de 3 años hace

Resuelto


only input
Return the output without writing any code into the function.

más de 3 años hace

Resuelto


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

más de 3 años hace

Resuelto


Convert degrees to radians
Given input in degrees, output to radians

más de 3 años hace

Resuelto


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

más de 3 años hace

Resuelto


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

más de 3 años hace

Resuelto


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

más de 3 años hace

Resuelto


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

más de 3 años hace

Resuelto


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

más de 3 años hace

Resuelto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

más de 3 años hace

Resuelto


ASCii Code
Using Matlab get the ASCii for '?'

más de 3 años hace

Resuelto


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

más de 3 años hace

Resuelto


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

más de 3 años hace

Resuelto


Transpose of matrix
Transpose of matrix as per test cases

más de 3 años hace

Resuelto


Create vector as shown in test cases
Create vector as shown in test cases

más de 3 años hace

Resuelto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

más de 3 años hace

Resuelto


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

más de 3 años hace

Resuelto


Binary Coder
Take an input number and print the binary value of this number.

más de 3 años hace

Resuelto


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

más de 3 años hace

Cargar más