Problema


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

quasi 6 anni fa | 5 | 181 risolutori

Risolto


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

quasi 6 anni fa

Risolto


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

quasi 6 anni fa

Risolto


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

quasi 6 anni fa

Risolto


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

quasi 6 anni fa

Risolto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

quasi 6 anni fa

Risolto


Areas
Given certain dimensions determine the area of that shape. If given only one value assume its the radius. Use round(x) to round ...

quasi 6 anni fa

Risolto


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

quasi 6 anni fa

Risolto


Remove the Zero
Given an array n, remove all zeros

quasi 6 anni fa

Risolto


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

quasi 6 anni fa

Risolto


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

quasi 6 anni fa

Risolto


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

quasi 6 anni fa

Risolto


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

quasi 6 anni fa

Risolto


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

quasi 6 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

quasi 6 anni fa

Risolto


only input
Return the output without writing any code into the function.

quasi 6 anni fa

Risolto


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

quasi 6 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

quasi 6 anni fa

Risolto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

quasi 6 anni fa

Risolto


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

quasi 6 anni fa

Risolto


Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.

quasi 6 anni fa

Carica altro