Solved

Add consecutive integer numbers

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

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

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

6 months ago

Solved

Calculate Resistance

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

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

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

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

6 months ago

Solved

MATCH THE STRINGS (2 CHAR) very easy

Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

6 months ago

Solved

Find the Nth Root of a Given Number

Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

6 months ago

Solved

Matlab Basics II - Log and natural log

Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

6 months ago

Solved

How to calculate log?

There is a log that have base 5. How to calculate? log5(x)?

6 months ago

Solved

Remove the air bubbles from a vector

_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

6 months ago

Solved

How many days in a month?

Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

6 months ago

Solved

Horizontal matrix sort

Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

6 months ago

Solved

Draw 'J'

Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

6 months ago

Solved

Draw a 'Z'.

Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

6 months ago

Solved

COUNT VOWEL 2

The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

6 months ago

Solved

house of cards

How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

6 months ago

Solved

attenuation

A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

6 months ago

Solved

Sum the Digits of a Number

Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

6 months ago

Solved

Getting the row and column location from a matrix

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

6 months ago

Solved

Given a matrix, return the last eigen value

Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

6 months ago

Solved

Determine if input is odd or even

Determine if input is odd or even, sample problem

6 months ago

Solved

Power of n ?

Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

7 months ago

Solved

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

7 months ago