Gelöst


Add 3 (x<=100) Or Subtract 100 and add 3(100<x)
Add 3 to every element. However, if the value is greater than 100, subtract 100 and add 3. eg. input x = [45 106; 67 1...

fast 4 Jahre vor

Gelöst


check whether a number is a pentatope number
<https://oeis.org/A000332>

fast 4 Jahre vor

Problem


increasing sequences
Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of t...

fast 4 Jahre vor | 0 | 9 Lösungsvorschläge

Gelöst


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

fast 4 Jahre vor

Gelöst


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

fast 4 Jahre vor

Gelöst


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

fast 4 Jahre vor

Gelöst


Dimensions of Spaces
Find the dimension of the column space, null space, row space, and left null space for any matrix. Example input A=[1 2 ...

fast 4 Jahre vor

Gelöst


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

fast 4 Jahre vor

Gelöst


Create all combinations of vectors
This function exists in the Neural Network Toolbox but is not available in Cody. Can you write such a function? See <http://...

fast 4 Jahre vor

Gelöst


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

fast 4 Jahre vor

Gelöst


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

fast 4 Jahre vor

Gelöst


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

fast 4 Jahre vor

Gelöst


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

fast 4 Jahre vor

Gelöst


Surface area of a cone

fast 4 Jahre vor

Gelöst


Perimeter of a Triangle

fast 4 Jahre vor

Gelöst


Area of a triangle given its sides

fast 4 Jahre vor

Gelöst


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

fast 4 Jahre vor

Gelöst


Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...

fast 4 Jahre vor

Gelöst


Solve system of equation!
Given provided system of equation, and find x and y. System of equation can be expressed as each term's coefficient. For exam...

fast 4 Jahre vor

Gelöst


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

fast 4 Jahre vor

Gelöst


raise 1/3
Raise a number to 1/3 power.

fast 4 Jahre vor

Gelöst


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

fast 4 Jahre vor

Gelöst


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

fast 4 Jahre vor

Gelöst


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

fast 4 Jahre vor

Gelöst


Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); ...

fast 4 Jahre vor

Gelöst


Make an identity matrix whose diagonal elements are 1:n
For a given input n, make an n by n identity matrix that contains the elements 1:n along its diagonal. For example, if input=5: ...

fast 4 Jahre vor

Gelöst


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

fast 4 Jahre vor

Gelöst


true or false
if the matrix has a zero, return true. else, return false

fast 4 Jahre vor

Gelöst


wipe out!
make all the elements in given x zero.

fast 4 Jahre vor

Mehr laden