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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


ASCii Code
Using Matlab get the ASCii for '?'

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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.

mehr als 3 Jahre vor

Gelöst


Transpose of matrix
Transpose of matrix as per test cases

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Mehr laden