Risolto


Automatic String Editing
In this function, you will take an incoming string, and output the same string with each character one letter later in the alpha...

circa 3 anni fa

Risolto


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

circa 3 anni fa

Risolto


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

circa 3 anni fa

Risolto


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

circa 3 anni fa

Risolto


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

circa 3 anni fa

Risolto


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


select the primes of a vector
Find the prime numbers in a vector

circa 3 anni fa

Risolto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

circa 3 anni fa

Risolto


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

circa 3 anni fa

Risolto


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

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

Risolto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

circa 3 anni fa

Risolto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

circa 3 anni fa

Risolto


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

circa 3 anni fa

Risolto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

circa 3 anni fa

Risolto


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

circa 3 anni fa

Risolto


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

circa 3 anni fa

Risolto


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

circa 3 anni fa

Risolto


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

circa 3 anni fa

Risolto


Area of a triangle given its sides

circa 3 anni fa

Risolto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

circa 3 anni fa

Risolto


文字列の最初と最後の文字だけ抜き出しましょう。
文字列の最初と最後の文字をつなげて返すような関数を作成しましょう。 もし文字が一つしかない場合、その文字は最初と最後の文字のため、関数はその文字を二回返すようにしておきましょう。 例: stringfirstandlast('borin...

circa 3 anni fa

Risolto


対称で、n*2n のサイズの行列を作成しましょう
サイズが n*2n の "mirror" 行列(対称行列)を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

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

Risolto


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

circa 3 anni fa

Risolto


ベクトルの値が増加しているかを調べよう
ベクトルの値が増加している場合 (ベクトルの各要素が前の要素よりも大きい場合) には true を、そうでない場合には false を返すようなコードを書いてみましょう。 例: 入力が x = [-3 0 7] のとき、 関数の...

circa 3 anni fa

Risolto


二乗になっている数を見つけよう
ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

circa 3 anni fa

Risolto


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.33...

circa 3 anni fa

Carica altro