문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

대략 9년 전

문제를 풀었습니다


select the primes of a vector
Find the prime numbers in a vector

대략 9년 전

문제를 풀었습니다


Complex number
For complex number c=a+bi, write code that will add a and b together.

대략 9년 전

문제를 풀었습니다


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

대략 9년 전

문제를 풀었습니다


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

대략 9년 전

문제를 풀었습니다


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

대략 9년 전

문제를 풀었습니다


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

대략 9년 전

문제를 풀었습니다


length of a vector
Find twice the length of a given vector.

대략 9년 전

문제를 풀었습니다


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

대략 9년 전

문제를 풀었습니다


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

대략 9년 전

문제를 풀었습니다


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

대략 9년 전

문제를 풀었습니다


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

대략 9년 전

문제를 풀었습니다


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

대략 9년 전

문제를 풀었습니다


Will there be a new leader?
Simply answer the title.

대략 9년 전

문제를 풀었습니다


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

대략 9년 전

문제를 풀었습니다


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

대략 9년 전

문제를 풀었습니다


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

대략 9년 전

문제를 풀었습니다


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

대략 9년 전

문제를 풀었습니다


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

대략 9년 전

문제를 풀었습니다


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

9년 초과 전

문제를 풀었습니다


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

9년 초과 전

문제를 풀었습니다


Concatenate matrix into 4 quadrants for given number of iteration
If given a matrix and number, output should be its concatenation like wavelet for given number of iterations. Example a ...

9년 초과 전

문제를 풀었습니다


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

9년 초과 전

문제를 풀었습니다


JOIN STRINGS
There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

9년 초과 전

문제를 풀었습니다


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

9년 초과 전

문제를 풀었습니다


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

9년 초과 전

문제를 풀었습니다


most frequent character
Obtain most frequent character Let s='balaram'; output='a';

거의 10년 전

문제를 풀었습니다


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

거의 10년 전

문제를 풀었습니다


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

거의 10년 전

더 보기