A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


ASCii Code
Using Matlab get the ASCii for '?'

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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.

presque 4 ans il y a

A résolu


Transpose of matrix
Transpose of matrix as per test cases

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

Charger plus