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

2 hours ago

Solved

Sum of Two Numbers

Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

2 hours ago

Solved

Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)

For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

14 hours ago

Solved

Create an index-powered vector

Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

14 hours ago

Solved

Count consecutive 0's in between values of 1

So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

14 hours ago

Solved

find radius of cone

if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

19 hours ago

Solved

find the surface area of a cube

given cube side length x, find the surface area of the cube, set it equal to y

19 hours ago

Solved

Building matrices

If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

19 hours ago

Solved

Deleting an element in a matrix

For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

19 hours ago

Solved

Generate a string like abbcccddddeeeee

This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

19 hours ago

Solved

Find nth maximum

Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

20 hours ago

Solved

MATLAB Basic: rounding III

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

20 hours ago

Solved

Volume of a box

Given a box with a length a, width b, and height c. Solve the volume of the box.

20 hours ago

Solved

Calculate area of sector

A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

20 hours ago

Solved

Determine if input is a valid AHP evaluation matrix

Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

3 days ago

Answered

Simpler way to write this scrip.

Time=0; balance=1000; while balance<10000 balance=500 + 1.05*balance; Time=Time+1; end display(Time);

Simpler way to write this scrip.

Time=0; balance=1000; while balance<10000 balance=500 + 1.05*balance; Time=Time+1; end display(Time);

3 days ago | 0

Answered

How Change Matrix Shape / Setting

This might not be the best way, but it works. C=[]; c=1; for k=2:2:size(val,3) B(:,:,c)=[val(:,:,k-1),val(:,:,k)];%horiz...

How Change Matrix Shape / Setting

This might not be the best way, but it works. C=[]; c=1; for k=2:2:size(val,3) B(:,:,c)=[val(:,:,k-1),val(:,:,k)];%horiz...

3 days ago | 0

Solved

Factorial Numbers

Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

4 days ago

Solved

vectorization in N

For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

4 days ago

Solved

Bit Reversal

Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

4 days ago

Solved

Matlab Basics - Rounding II

Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

4 days ago