Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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]

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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]

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


Add two numbers
Add two numbers (For beginners)

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Mehr laden