Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

circa 5 anni fa

Risolto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

circa 5 anni fa

Risolto


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

circa 5 anni fa

Risolto


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

circa 5 anni fa

Risolto


Calculate volume of box
Calculate the volume of box,hiven its sides

circa 5 anni fa

Risolto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

circa 5 anni fa

Risolto


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

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

Risolto


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

circa 5 anni fa

Risolto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

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

Risolto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

circa 5 anni fa

Risolto


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

circa 5 anni fa

Risolto


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

circa 5 anni fa

Risolto


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

circa 5 anni fa

Risolto


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

circa 5 anni fa

Risolto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

circa 5 anni fa

Risolto


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

circa 5 anni fa

Risolto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

circa 5 anni fa

Risolto


Add two numbers
Add two numbers (For beginners)

circa 5 anni fa

Risolto


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

circa 5 anni fa

Risolto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

circa 5 anni fa

Risolto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

circa 5 anni fa

Risolto


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

circa 5 anni fa

Risolto


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

circa 5 anni fa

Risolto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

circa 5 anni fa

Risolto


Divisible by 9
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

circa 5 anni fa

Risolto


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

circa 5 anni fa

Risolto


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

circa 5 anni fa

Risolto


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

circa 5 anni fa

Carica altro