문제를 풀었습니다


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

거의 4년 전

문제를 풀었습니다


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

거의 4년 전

문제를 풀었습니다


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

거의 4년 전

문제를 풀었습니다


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

거의 4년 전

문제를 풀었습니다


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

거의 4년 전

문제를 풀었습니다


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

거의 4년 전

문제를 풀었습니다


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

거의 4년 전

문제를 풀었습니다


Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

대략 6년 전

문제를 풀었습니다


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

대략 6년 전

문제를 풀었습니다


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

대략 7년 전

문제를 풀었습니다


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

대략 7년 전

답변 있음
computational complexity of eig and pinv
The computational cost of eig should be O(N^3) with N dimension of the matrix

7년 초과 전 | 0

문제를 풀었습니다


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

7년 초과 전

문제를 풀었습니다


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

7년 초과 전

문제를 풀었습니다


Create a vector
Create a vector from 0 to n by intervals of 2.

7년 초과 전

문제를 풀었습니다


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.

7년 초과 전

문제를 풀었습니다


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

7년 초과 전

문제를 풀었습니다


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

7년 초과 전

문제를 풀었습니다


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

7년 초과 전

문제를 풀었습니다


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

7년 초과 전

문제를 풀었습니다


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

7년 초과 전

문제를 풀었습니다


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

7년 초과 전

문제를 풀었습니다


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

7년 초과 전

문제를 풀었습니다


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

7년 초과 전

문제를 풀었습니다


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

7년 초과 전

문제를 풀었습니다


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

7년 초과 전

문제를 풀었습니다


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

7년 초과 전

문제를 풀었습니다


Potential Energy
Calculate the potential energy of a rock.

7년 초과 전

문제를 풀었습니다


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

7년 초과 전

더 보기