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

8 dagen 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 [...

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

8 dagen 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;

8 dagen 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

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

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

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

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

8 dagen ago

Solved

MATLAB Basic: rounding III

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

8 dagen ago

Solved

Volume of a box

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

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

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

10 dagen 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);

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

10 dagen ago | 0

| accepted

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

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

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

11 dagen 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

11 dagen ago

Solved

Matlab Basics - Rounding III

Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

11 dagen ago

Solved

Matlab Basics - Absolute Value

Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

11 dagen ago