Solved

Rounding
Round 10.67 and make 'y' equal to that number.

plus de 3 ans ago

Solved

length of a vector
Find twice the length of a given vector.

plus de 3 ans ago

Solved

only input
Return the output without writing any code into the function.

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

Joules!
1J = 101.325 L/atm Write a statement that assigns fractionalMultiplier with 101.325 Write a second statement that assigns Jo...

plus de 3 ans ago

Solved

For given vectors x,y find coresponding spline coefficients.
For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

plus de 3 ans ago

Solved

merge two matrices together in one matrix
a= [1 2 3 4]; b=[5 6 7 8]; take the first column from matrix (a)and (b)then insert them in matrix (c) respectively, and so on;...

plus de 3 ans ago

Solved

'Price of pizza!'
If you want to check pizza's price, try this! price is proportional to its volume, so you have to multiply 0.1(\$) to pizza's v...

plus de 3 ans ago

Solved

test_first
just to test

plus de 3 ans ago

Solved

Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

plus de 3 ans ago

Solved

radius of a spherical planet
you just measured its surface area, that is the input.

plus de 3 ans ago

Solved

Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

plus de 3 ans ago

Solved

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]

plus de 3 ans ago

Solved

Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

plus de 3 ans ago

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

plus de 3 ans ago

Solved

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.

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

plus de 3 ans ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

plus de 3 ans ago

Solved

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

plus de 3 ans ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Solved

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

plus de 3 ans ago

Load more