문제를 풀었습니다


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

대략 4년 전

문제를 풀었습니다


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

대략 4년 전

문제를 풀었습니다


Square
X is a number, write a code, where Y should be the square of X.

대략 4년 전

문제를 풀었습니다


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

대략 4년 전

문제를 풀었습니다


Flag a convertible string
If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example: ...

대략 4년 전

문제를 풀었습니다


Pixel density
<https://en.wikipedia.org/wiki/Pixel_density Pixel density> tells us how many pixels we can find within a unit of length. And a...

대략 4년 전

문제를 풀었습니다


Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of <https://mathworld.wolfram.com/WagstaffPrime.html Wagstaff primes>. Write a func...

대략 4년 전

문제를 풀었습니다


Find out rooms, peak to peak, average for a square wave.
Find out rms, peak to peak, average for a square wave from peak value. <http://www.rfcafe.com/references/electrical/square-w...

대략 4년 전

문제를 풀었습니다


calculate interest saved because of reduction of interest rate
calculate interest saved because of a reduction of interest rate per year (Assuming No leap year) Currently, in India, rate o...

대략 4년 전

문제를 풀었습니다


Check transmitted data follow even parity (True or false)
Check transmitted data follow even parity (True or false) <http://en.wikipedia.org/wiki/Parity_bit/ Parity Bit> Say, '010...

대략 4년 전

문제를 풀었습니다


Find Excess 3 code of given decimal number.
Find Excess 3 code of given binary number. <http://en.wikipedia.org/wiki/Excess-3/ Excess-3> In XS-3, numbers are represe...

대략 4년 전

문제를 풀었습니다


find out eigenvector of matrix
find out eigenvector of matrix A =eye(3); Answer is [0 0 1; 0 1 0; 1 0 0];

대략 4년 전

문제를 풀었습니다


Do operation as per given string
Do operation as per given string Example: '3*5' then answer must be 15; '3+5' then answer must be 8; '35' then answer ...

대략 4년 전

문제를 풀었습니다


Case-insensitive Character Detection
Find the index of a particular character in a string ignoring case. Example Input: x = 'aAbhhfdf' n = 'a' ...

대략 4년 전

문제를 풀었습니다


Lunar Arithmetic (Addition)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit. Example 1: ...

대략 4년 전

문제를 풀었습니다


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

대략 4년 전

문제를 풀었습니다


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

대략 4년 전

문제를 풀었습니다


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

대략 4년 전

문제를 풀었습니다


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x&#8321;_ + _x&#8322;_ = 2 _x&#8321;...

대략 4년 전

문제를 풀었습니다


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

대략 4년 전

문제를 풀었습니다


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

대략 4년 전

문제를 풀었습니다


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

대략 4년 전

문제를 풀었습니다


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

대략 4년 전

문제를 풀었습니다


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

대략 4년 전

문제를 풀었습니다


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

대략 4년 전

문제를 풀었습니다


Variance computation (★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

대략 4년 전

문제를 풀었습니다


Create a vector of the first n natural numbers (★)
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

대략 4년 전

문제를 풀었습니다


Average of corner elements of a matrix (★★)
(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

대략 4년 전

문제를 풀었습니다


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

대략 4년 전

문제를 풀었습니다


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

대략 4년 전

더 보기