Feeds
문제를 풀었습니다
Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...
대략 4년 전
문제를 풀었습니다
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
대략 4년 전
문제를 풀었습니다
The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...
대략 4년 전
문제를 풀었습니다
Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.
대략 4년 전
문제를 풀었습니다
Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3
대략 4년 전
문제를 풀었습니다
sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...
대략 4년 전
문제를 풀었습니다
Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...
5년 초과 전
문제를 풀었습니다
Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.
거의 6년 전
문제를 풀었습니다
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];
거의 6년 전
문제를 풀었습니다
Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...
거의 6년 전
문제를 풀었습니다
Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...
거의 6년 전
문제를 풀었습니다
Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5
거의 6년 전
문제를 풀었습니다
Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...
거의 6년 전
문제를 풀었습니다
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...
거의 6년 전
문제를 풀었습니다
Convert yards to feet
The goal of this script is to convert a value given in yards to feet.
거의 6년 전
문제를 풀었습니다
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...
거의 6년 전
문제를 풀었습니다
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...
거의 6년 전
문제를 풀었습니다
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
거의 6년 전
문제를 풀었습니다
Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]
거의 6년 전
문제를 풀었습니다
Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...
거의 6년 전
문제를 풀었습니다
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
거의 6년 전
문제를 풀었습니다
MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...
거의 6년 전