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

circa 3 anni ago

Solved

Create a square matrix of zeros of even order

Create a square matrix of zeros of even order

circa 3 anni ago

Solved

Area of a Square

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

circa 3 anni 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...

circa 3 anni 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 ...

circa 3 anni 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...

circa 3 anni 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

circa 3 anni 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 ...

circa 3 anni 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. ...

circa 3 anni 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

circa 3 anni 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...

circa 3 anni 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...

circa 3 anni ago

Solved

Reverse a string

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

circa 3 anni 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...

circa 3 anni 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...

circa 3 anni 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...

circa 3 anni 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.

circa 3 anni 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...

circa 3 anni 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 ...

circa 3 anni 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...

circa 3 anni 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...

circa 3 anni ago

Solved

Concatenate strings

concatenate a variable number of input strings to produce one outputstring

circa 3 anni ago

Solved

Kelvin to Celsius

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

circa 3 anni ago

Solved

Is it column vector?

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

circa 3 anni ago