Community Profile

photo

RAScott


Last seen: 2ヶ月 前 2019 年からアクティブ

統計

  • Promoter
  • Solver

バッジを表示

Content Feed

表示方法

解決済み


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

4年以上 前

解決済み


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

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年以上 前

解決済み


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

4年以上 前

解決済み


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

4年以上 前

解決済み


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

4年以上 前

解決済み


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

4年以上 前

解決済み


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

4年以上 前

解決済み


Is my wife right?
Regardless of input, output the string 'yes'.

4年以上 前

解決済み


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

4年以上 前

解決済み


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

4年以上 前

解決済み


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

4年以上 前

解決済み


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

4年以上 前

解決済み


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

4年以上 前

解決済み


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

4年以上 前

解決済み


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

4年以上 前

解決済み


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

4年以上 前

解決済み


Fill the matrix - 1
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

4年以上 前

解決済み


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

4年以上 前

解決済み


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

4年以上 前

解決済み


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

4年以上 前

解決済み


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

4年以上 前

解決済み


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

4年以上 前

解決済み


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

4年以上 前

解決済み


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

4年以上 前

解決済み


frame of the matrix
Given the matrix M, return M without the external frame.

4年以上 前

解決済み


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

4年以上 前

解決済み


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

4年以上 前

解決済み


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

4年以上 前

解決済み


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

4年以上 前

さらに読み込む