Solved

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

2 years ago

Solved

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

2 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Answered

computational complexity of eig and pinv

The computational cost of eig should be O(N^3) with N dimension of the matrix

computational complexity of eig and pinv

The computational cost of eig should be O(N^3) with N dimension of the matrix

3 years ago | 0

Solved

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

3 years ago

Solved

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

3 years ago

Solved

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.

3 years ago

Solved

ベクトル [1 2 3 4 5 6 7 8 9 10] の作成

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

3 years ago

Solved

Given the variable x as your input, multiply it by four, then divide it by two. Then put the result in y.

If x = 5, y = 4*5/2 = 10

3 years ago

Solved

Skip by a multiple

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

3 years ago

Solved

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

3 years ago

Solved

Vector creation

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

3 years ago

Solved

Convert yards to feet

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

3 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Solved

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

3 years ago

Solved

Sum the 'edge' values of a matrix

Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

3 years ago

Solved

Finding perimeter of a rectangle

A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

3 years ago

Solved

Multiply by 3

Given the variable x as your input, multiply it by three and put the result in y.

3 years ago

Solved

multiply by three

Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

3 years ago

Solved

Compare two input matrices

Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

3 years ago

Solved

Add 7

Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

3 years ago

Solved

Y=X

Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

3 years ago