Risolto


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

circa 4 anni fa

Risolto


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

circa 4 anni fa

Risolto


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

circa 4 anni fa

Risolto


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

circa 4 anni fa

Risolto


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

circa 4 anni fa

Risolto


Converts numbers into characters
Converts numbers into characters

circa 4 anni fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

circa 4 anni fa

Risolto


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

circa 4 anni fa

Risolto


to the 2 all elements
to the 2 all elements

circa 4 anni fa

Risolto


Double all elements in the array
Duplicate all elements in the array

circa 4 anni fa

Risolto


Draw a '0' in a one matrix!

circa 4 anni fa

Risolto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

circa 4 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

circa 4 anni fa

Risolto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

circa 4 anni fa

Risolto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

circa 4 anni fa

Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

circa 4 anni fa

Risolto


Laws of motion 1

circa 4 anni fa

Risolto


the average value of the elements
Calculate the average value of the elements in the array

circa 4 anni fa

Risolto


Find the max element of the array
Find the max element of the array

circa 4 anni fa

Risolto


calculate the length of matrix
input 1 array, calculate the length

circa 4 anni fa

Risolto


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

circa 4 anni fa

Risolto


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

circa 4 anni fa

Risolto


Add two numbers
Given a and b, return the sum a+b in c.

circa 4 anni fa

Risolto


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

circa 4 anni fa

Risolto


Area of rhombus
Calculate the rhombus area

circa 4 anni fa

Risolto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

circa 4 anni fa

Risolto


Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...

circa 4 anni fa

Risolto


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

circa 4 anni fa

Risolto


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

circa 4 anni fa

Risolto


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

circa 4 anni fa

Carica altro