Risolto


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

quasi 12 anni fa

Risolto


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

quasi 12 anni fa

Risolto


Concatenate two strings
Its very easy. Just concatenate two strings.

quasi 12 anni fa

Risolto


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

quasi 12 anni fa

Risolto


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

quasi 12 anni fa

Risolto


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

quasi 12 anni fa

Risolto


Max of a Vector
Write a function to return the max of a vector

quasi 12 anni fa

Risolto


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

quasi 12 anni fa

Risolto


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

quasi 12 anni fa

Risolto


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

quasi 12 anni fa

Risolto


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

quasi 12 anni fa

Risolto


Determine the square root
Determine the square root of the value the user has entered, n.

quasi 12 anni fa

Risolto


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

quasi 12 anni fa

Risolto


Positive Infinity
Round the array a towards positive infinity

quasi 12 anni fa

Risolto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

quasi 12 anni fa

Risolto


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

quasi 12 anni fa

Risolto


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

quasi 12 anni fa

Risolto


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

quasi 12 anni fa

Risolto


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

quasi 12 anni fa

Risolto


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

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

quasi 12 anni fa

Risolto


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

quasi 12 anni fa

Carica altro