Solved

Find out output of following expression

Find out output of following expression Q=2log10 x+cos π+√(5yz)+|x^2-y^2 |

meer dan een jaar ago

Solved

Union of two set decreasing order

Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

meer dan een jaar ago

Solved

Determine the mean of matrix

Determine the mean of matrix without using mean function Hint: use simple algorithm

meer dan een jaar ago

Solved

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}

if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

meer dan een jaar ago

Solved

Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:

A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

meer dan een jaar ago

Solved

Product of Each Column

Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

bijna 2 jaar ago

Solved

Eye Squared

For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

bijna 2 jaar ago

Solved

Vector pop

Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

bijna 2 jaar ago

Solved

Sum of adjacent elements in a vector

Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

bijna 2 jaar ago

Solved

Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.

--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

bijna 2 jaar ago

Solved

Subtract two positive numbers

Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

bijna 2 jaar ago

Solved

Find nearest prime number less than input number

Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

bijna 2 jaar ago

Solved

Is it an Armstrong number?

An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

bijna 2 jaar ago

Solved

Number of vertices of a hypercube

Return the number of vertices of a n-dimensional hypercube.

bijna 2 jaar ago

Solved

Periodic Table 101.

Given the atomic number (z), answer the symbol for that particular element of the <http://en.wikipedia.org/wiki/Periodic_table/ ...

bijna 2 jaar ago

Solved

Periodic Table II 101.

Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

bijna 2 jaar ago

Solved

Distance walked 2D

Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

bijna 2 jaar ago

Solved

Make roundn function

Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

bijna 2 jaar ago

Solved

Analyze observation data

Suppose you have the following data (A,B,C) in three-column format. A B C -------------------------- t=1 ...

bijna 2 jaar ago

Solved

Replace 0 to NaN!

In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

bijna 2 jaar ago

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

bijna 2 jaar ago

Solved

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

bijna 2 jaar ago

Solved

Half-Swap

Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

bijna 2 jaar ago

Solved

Add 3 numbers

In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

bijna 2 jaar ago

Solved

Calculate Resistance

Calculate Resistance R of a linear conductor having resistivity p, length l and area A

bijna 2 jaar ago

Solved

Calculate Resistance 2

In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

bijna 2 jaar ago

Solved

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

bijna 2 jaar ago

Solved

Read a column of numbers and interpolate missing data

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

bijna 2 jaar ago

Solved

Equal to their cube

Tell me three real numbers that are equal to their cubes?

bijna 2 jaar ago