Risolto


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

oltre 6 anni fa

Risolto


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

oltre 6 anni fa

Risolto


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

oltre 6 anni fa

Risolto


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

oltre 6 anni fa

Risolto


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

oltre 6 anni fa

Risolto


Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

oltre 6 anni fa

Risolto


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

oltre 6 anni fa

Risolto


Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

oltre 6 anni fa

Risolto


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

oltre 6 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 6 anni fa

Risolto


Sort the prime numbers in each row of a 3x3 matrix
Considering a 3x3 matrix A, sort the prime numbers of each row in ascending order. For exemple: input A=[5 8 2 4; ...

oltre 6 anni fa

Risolto


Determina si el número es primo
Primero, antes que nada: ¿Qué es un número primo? Un número primo es cualquier número que solamente se puede dividir por 1 y ...

oltre 6 anni fa

Risolto


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

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

oltre 6 anni fa

Risolto


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

oltre 6 anni fa

Risolto


Decrypt Polybius
Decrypt Polybius square. Please refer to <http://www.mathworks.com/matlabcentral/cody/problems/1150-polybius-square Problem 11...

oltre 6 anni fa

Risolto


Generate Golomb's sequence
Generate Golomb's sequence up to the given number. If n=4, then seq = [1, 2, 2, 3, 3, 4, 4, 4] If n=6, then s...

oltre 6 anni fa

Risolto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

oltre 6 anni fa

Risolto


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

oltre 6 anni fa

Risolto


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

oltre 6 anni fa

Problema


Evaluate the generalized hypergeometric function
The <https://en.wikipedia.org/wiki/Generalized_hypergeometric_function generalized hypergeometric function> is defined as <<...

oltre 6 anni fa | 0 | 8 risolutori

Risolto


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

oltre 6 anni fa

Risolto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

oltre 6 anni fa

Risolto


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

oltre 6 anni fa

Risolto


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

oltre 6 anni fa

Risolto


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of ...

oltre 6 anni fa

Problema


Solve a Weird Calculator puzzle
The September 2012 issue of GAMES Magazine had a Weird Calculator puzzle by Erich Friedman. In this puzzle, the calculator has o...

oltre 6 anni fa | 0 | 14 risolutori

Risolto


A different counting method
Given an array (x) of integers, the "counting" array (y) is showing the number of identical consecutive integers in x in front o...

oltre 6 anni fa

Risolto


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

oltre 6 anni fa

Risolto


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

oltre 6 anni fa

Carica altro