문제를 풀었습니다


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input is n=4 th...

29일 전

문제를 풀었습니다


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

29일 전

문제를 풀었습니다


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

29일 전

문제를 풀었습니다


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

29일 전

문제를 풀었습니다


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

29일 전

문제를 풀었습니다


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

29일 전

문제를 풀었습니다


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

29일 전

문제를 풀었습니다


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

29일 전

문제를 풀었습니다


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

29일 전

문제를 풀었습니다


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

29일 전

문제를 풀었습니다


Box!
Given a box, find the volume of the cube. With each side = a.

29일 전

문제를 풀었습니다


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

29일 전

문제를 풀었습니다


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

29일 전

문제를 풀었습니다


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

29일 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

29일 전

문제를 풀었습니다


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

29일 전

문제를 풀었습니다


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

29일 전

문제를 풀었습니다


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

29일 전

문제를 풀었습니다


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

29일 전

문제를 풀었습니다


Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

29일 전

문제를 풀었습니다


calculate RMS voltage
given peak to peak voltage, calculate rms voltage

29일 전

문제를 풀었습니다


Negative matrix
Change the sign of all elements in given matrix.

29일 전

문제를 풀었습니다


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

29일 전

문제를 풀었습니다


04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

29일 전

문제를 풀었습니다


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

29일 전

문제를 풀었습니다


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

29일 전

문제를 풀었습니다


Find Logic 3

29일 전

문제를 풀었습니다


Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

29일 전

문제를 풀었습니다


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

29일 전

문제를 풀었습니다


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

29일 전

더 보기