문제를 풀었습니다


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

1년 초과 전

문제를 풀었습니다


Use R2016b Text Manipulations to Fix These Addresses (Part 3)
We have a series of addresses like the following which we'd like to reformat. Each of the addresses lacks a space and a comma ...

1년 초과 전

문제를 풀었습니다


Use R2016b Text Manipulations to Fix These Addresses (Part 2)
We have a series of addresses like the following which we'd like to reformat. All the addresses are in the Boston area of Mass...

1년 초과 전

문제를 풀었습니다


Use R2016b Text Manipulations to Fix These Addresses (Part 1)
We have a series of addresses like the following which we'd like to reformat. Can you remove the latitude and longitude from the...

1년 초과 전

문제를 풀었습니다


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

1년 초과 전

문제를 풀었습니다


Easy Sequences 96: One-line Code Challenge - Polynomial Folding Function
The Matlab fold function is a very useful functional programming construct. Unfortunatlely, fold is only available in newer Matl...

1년 초과 전

문제를 풀었습니다


Easy Sequences 98: One-line Code Challenge - Ternary Operator Function
Ternary operation is a standard construct in most computer languages. The ternary operator assigns value to a variable depending...

1년 초과 전

문제를 풀었습니다


A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

1년 초과 전

문제


Easy Sequences 99: One-line Code Challenge - Real Digitizer
Given a real number r, write the function rDigitizer that breaks r into constituent digits and symbols. For example: >> ...

1년 초과 전 | 0 | 솔버 수: 1

문제를 풀었습니다


Easy Sequences 97: One-line Code Challenge - Sequence with Constant Difference
While answering Problem #57725, I noticed a pattern that immediately led me to a solution, namely: the -th difference of the seq...

1년 초과 전

문제


Easy Sequences 98: One-line Code Challenge - Ternary Operator Function
Ternary operation is a standard construct in most computer languages. The ternary operator assigns value to a variable depending...

1년 초과 전 | 0 | 솔버 수: 6

문제


Easy Sequences 97: One-line Code Challenge - Sequence with Constant Difference
While answering Problem #57725, I noticed a pattern that immediately led me to a solution, namely: the -th difference of the seq...

1년 초과 전 | 0 | 솔버 수: 1

문제를 풀었습니다


Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

1년 초과 전

문제를 풀었습니다


Tax Calculator
Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

1년 초과 전

문제를 풀었습니다


Find the area of a triangle having vertices (A,B), (C,D), and (E,F)
Find the area of a triangle using if we have the three vertices of the triangle

1년 초과 전

문제를 풀었습니다


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

1년 초과 전

문제를 풀었습니다


Expand a term
Given a term, as a string, expand it. e. g. f = '2(x + y)';

1년 초과 전

문제를 풀었습니다


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

1년 초과 전

문제를 풀었습니다


Frobenius Norm
Write your own version of Frobenius Norm without using the 'norm' function.

1년 초과 전

문제를 풀었습니다


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

1년 초과 전

문제를 풀었습니다


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

1년 초과 전

문제를 풀었습니다


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

1년 초과 전

문제를 풀었습니다


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

1년 초과 전

문제를 풀었습니다


Toolbox check part 3
In my ongoing quest to highlight obscure parts of MATLAB, the latest challenge is to take 2 string inputs, one a MATLAB toolbox ...

1년 초과 전

문제를 풀었습니다


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

1년 초과 전

문제를 풀었습니다


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

1년 초과 전

문제를 풀었습니다


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

1년 초과 전

문제를 풀었습니다


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

1년 초과 전

문제를 풀었습니다


Consecutive Pairs of Smooth Numbers from Set of Prime Numbers
Given an input set of prime numbers (p), generate all pairs of consecutive smooth numbers (x) (see Stormer's Theorem). For exam...

1년 초과 전

문제를 풀었습니다


Count the non-zero elements along the diagonals that are immediately next to the main diagonal
Suppose, you are being told to write a matrix, *a* as input in MATLAB with having the possibility of containing zero and non-zer...

1년 초과 전

더 보기