Gelöst


Return area of square
Side of square=input=a Area=output=b

2 Monate vor

Gelöst


Add two numbers
Given a and b, return the sum a+b in c.

2 Monate vor

Gelöst


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.

2 Monate vor

Gelöst


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

2 Monate vor

Gelöst


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

2 Monate vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

2 Monate vor

Gelöst


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to find the logical indices o...

2 Monate vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

2 Monate vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

2 Monate vor

Gelöst


Inner product of two vectors
Find the inner product of two vectors.

2 Monate vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

2 Monate vor

Gelöst


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

2 Monate vor

Gelöst


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

2 Monate vor

Gelöst


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

2 Monate vor