Solved

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

4 months ago

Solved

Create a square matrix of zeros of even order

Create a square matrix of zeros of even order

4 months ago

Solved

Area of a Square

Given the length x of the side of a regular square, find the area of the square, A.

4 months ago

Solved

Calculate the centroid of a triangle

Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

4 months ago

Solved

Replace Nonzero Numbers with 1

Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

4 months ago

Solved

metre to feet converter

The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

4 months ago

Solved

Change string to number

Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

4 months ago

Solved

Delete 2nd and 5th column of Given 6*6 matrix

Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

4 months ago

Solved

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

4 months ago

Solved

Put two time series onto the same time basis

Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

4 months ago

Solved

Return a list sorted by number of consecutive occurrences

Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

4 months ago

Solved

Reverse a string

Reverse the given string. Example input = 'reverse' output = 'esrever'

4 months ago

Solved

Tax Calculator

Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

4 months ago

Solved

cross in array

Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

4 months ago

Solved

Calculate some equation

Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

4 months ago

Solved

Find the area of a rectangle if length of the diagonal is given.

if length of a diagnonal in rectangle is 5. Its area is 12.

4 months ago

Solved

Replace values under a limit

For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

4 months ago

Solved

Evaluate Polynomial

Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

4 months ago

Solved

Convert a vector into numbers

Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

4 months ago

Solved

Try and Catch Simple Example

Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

4 months ago

Solved

Concatenate strings

concatenate a variable number of input strings to produce one outputstring

4 months ago

Solved

Kelvin to Celsius

Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

4 months ago

Solved

Is it column vector?

Is it column vector? Check vector for column vector without using iscolumn function.

4 months ago