Risolto


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. The element values ...

circa 7 anni fa

Risolto


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the rolls is likely to be close to the expected value of a sin...

circa 7 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 7 anni fa

Risolto


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

circa 7 anni fa

Risolto


Calculate BMI
Given a matrix |hw| with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 inch = 2.54 centimet...

circa 7 anni fa

Risolto


Solve a System of Linear Equations
Given a constant input angle θ(theta) in radians, create the coefficient matrix(A) and constant vector(b) to solve the giv...

circa 7 anni fa

Risolto


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

circa 7 anni fa

Risolto


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt).cos(2πft)| Given inputs λ ( |lambda...

circa 7 anni fa

Risolto


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue dashed line of |y| versus |t|. Mark the minimum value |m| of the...

circa 7 anni fa

Risolto


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

circa 7 anni fa

Risolto


Get Next Combination
Return next combination For example three-element combinations of 1:5 1 2 3 1 2 4 1 ...

circa 7 anni fa

Risolto


Find square of given number
Find Square of any number

circa 7 anni fa

Risolto


Vogel-Dobbener entropy
*Vogel-Dobbener entropy* is a measure of dispersion for ordinal variables. Given an ordered list of distinct observations u_...

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

oltre 7 anni fa

Risolto


Parsing Expressions - Binary Arithmetic Operators I
Parse and evaluate expressions like these: '1 + 2' '51 - 78' '42 * 9' The only operators are +, -, *. Both argu...

oltre 7 anni fa

Risolto


anshil's problem
Only anshil should solve ans = ''

oltre 7 anni fa

Risolto


Write a code to give student grade
Write a code to give student ' pass' grade if he/she gets more than 49 in the exam, and 'fail' grade otherwise. ''Many of lif...

oltre 7 anni fa

Risolto


CowBoy
A group of cowboys standing in circle form. They have one gun. The first cowboy shoot the cowboy beside him (second one) and giv...

oltre 7 anni fa

Risolto


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

oltre 7 anni fa

Risolto


Find left eigenvector of row stochastic matrix
Find the left eigenvector of the given stochastic matrix P that has eigenvalue 1. Normalize the vector so the sum of the entri...

oltre 7 anni fa

Risolto


Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

oltre 7 anni fa

Risolto


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

oltre 7 anni fa

Risolto


Permutation Via Multiplication
Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...

oltre 7 anni fa

Risolto


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

oltre 7 anni fa

Risolto


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

oltre 7 anni fa

Risolto


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

oltre 7 anni fa

Risolto


X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

oltre 7 anni fa

Risolto


Two fractions, one sum
Given a positive number x, write a MATLAB script that will tell you how many ways that the reciprocal of that number can be writ...

oltre 7 anni fa

Risolto


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

oltre 7 anni fa

Risolto


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

oltre 7 anni fa

Carica altro