Risolto


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

4 mesi fa

Risolto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

4 mesi fa

Risolto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

4 mesi fa

Risolto


square of a number
find square of a given number

4 mesi fa

Risolto


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

4 mesi fa

Risolto


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

4 mesi fa

Risolto


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

4 mesi fa

Risolto


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

4 mesi fa

Risolto


prime test
find largest 2 digit prime number

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

4 mesi fa

Risolto


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

4 mesi fa

Risolto


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

4 mesi fa

Risolto


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

4 mesi fa

Risolto


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

4 mesi fa

Risolto


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

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

4 mesi fa

Risolto


Area of rhombus
Calculate the rhombus area

4 mesi fa

Risolto


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

4 mesi fa

Risolto


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

4 mesi fa

Risolto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

4 mesi fa

Risolto


Will there be a new leader?
Simply answer the title.

4 mesi fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

4 mesi fa

Risolto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

4 mesi fa

Risolto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

4 mesi fa

Risolto


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

4 mesi fa

Risolto


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

4 mesi fa

Risolto


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

4 mesi fa

Risolto


Determine the length of a string of characters
Determine the length of a string of characters

4 mesi fa

Risolto


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.

4 mesi fa

Risolto


Product of Array
Given an array of numbers. Get the product of the array.

4 mesi fa

Carica altro