解決済み


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

約2年 前

解決済み


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

約2年 前

解決済み


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

約2年 前

解決済み


Array of Ones
Create a 100 X 100 array of ones.

約2年 前

解決済み


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...

約2年 前

解決済み


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

約2年 前

解決済み


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

約2年 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

約2年 前

解決済み


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

約2年 前

解決済み


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

約2年 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

約2年 前

解決済み


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

約2年 前

解決済み


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

約2年 前

解決済み


reverse string
input='rama' output='amar'

約2年 前

解決済み


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

約2年 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

約2年 前

解決済み


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

約2年 前

解決済み


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

約2年 前

解決済み


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

約2年 前

解決済み


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

約2年 前

解決済み


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

約2年 前

解決済み


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

約2年 前

解決済み


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

約2年 前

解決済み


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

約2年 前

解決済み


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

約2年 前

解決済み


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

約2年 前

解決済み


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

約2年 前

解決済み


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

約2年 前

解決済み


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

約2年 前

解決済み


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

約2年 前

さらに読み込む