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

2 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);

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

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

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

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

3 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

3 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

3 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]

3 dagen ago

Solved

Matlab Basics II - Free Fall

An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

3 dagen ago

Solved

Matlab Basics II - Count rows in a matrix

Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

3 dagen ago

Solved

Matlab Basics - Convert a row vector to a column vector

Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

3 dagen ago

Solved

Matlab Basics II - Minimum

Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

3 dagen ago

Solved

Matlab Basics - Rounding I

Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

3 dagen ago

Solved

Matlab Basics II - squares

Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

3 dagen ago

Solved

Matlab Basics - Create a row vector

Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

3 dagen ago

Solved

construct matrix with identical rows

Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

3 dagen ago

Solved

Sum of diagonals elements of a matrix

Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

3 dagen ago

Solved

Find Out sum of principal diagonal element of given matrix

Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

3 dagen ago

Solved

Convert yards to feet

The goal of this script is to convert a value given in yards to feet.

3 dagen ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

3 dagen ago

Solved

Sum the squares of numbers from 1 to n

For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

3 dagen ago

Solved

Inverse of Hilbert matrix

Given a non-negative integer x, return the element-wise power of 2 of the inverse of Hilbert matrix.

3 dagen ago