Risolto


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Negative matrix
Change the sign of all elements in given matrix.

circa 9 anni fa

Risolto


frame of the matrix
Given the matrix M, return M without the external frame.

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

circa 9 anni fa

Risolto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

circa 9 anni fa

Risolto


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

circa 9 anni fa

Risolto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

circa 9 anni fa

Risolto


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

circa 9 anni fa

Risolto


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

circa 9 anni fa

Risolto


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

circa 9 anni fa

Risolto


Complex number
For complex number c=a+bi, write code that will add a and b together.

circa 9 anni 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.

circa 9 anni fa

Risolto


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

circa 9 anni fa

Risolto


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

circa 9 anni fa

Risolto


Min of a Matrix
Return the minimum value in the given matrix.

circa 9 anni fa

Risolto


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

circa 9 anni fa

Risolto


Joules!
1J = 101.325 L/atm Write a statement that assigns fractionalMultiplier with 101.325 Write a second statement that assigns Jo...

circa 9 anni fa

Risolto


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

circa 9 anni fa

Risolto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

circa 9 anni fa

Risolto


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

circa 9 anni 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 + ...

circa 9 anni fa

Risolto


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

circa 9 anni fa

Risolto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

circa 9 anni fa

Risolto


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

circa 9 anni fa

Risolto


Spherical Volume
Calculate the volume of a sphere.

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

circa 9 anni fa

Risolto


Flipping a Matrix
Flipping matrix up and down. If a middle row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

oltre 9 anni fa

Carica altro