Risolto


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

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

quasi 12 anni fa

Risolto


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

quasi 12 anni fa

Risolto


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

quasi 12 anni fa

Risolto


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

quasi 12 anni fa

Risolto


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

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

quasi 12 anni fa

Risolto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

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


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

quasi 12 anni fa

Risolto


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

quasi 12 anni fa

Risolto


Rounding
Round 10.67 and make 'y' equal to that number.

quasi 12 anni fa

Risolto


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

quasi 12 anni fa

Risolto


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

quasi 12 anni fa

Risolto


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

quasi 12 anni fa

Risolto


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

quasi 12 anni fa

Risolto


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

quasi 12 anni fa

Risolto


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

quasi 12 anni fa

Risolto


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

quasi 12 anni fa

Risolto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

quasi 12 anni fa

Risolto


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

quasi 12 anni fa

Risolto


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

quasi 12 anni fa

Risolto


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

quasi 12 anni fa

Risolto


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

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


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

quasi 12 anni fa

Risolto


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

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


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

quasi 12 anni fa

Risolto


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

quasi 12 anni fa

Carica altro