解決済み


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

3年以上 前

解決済み


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

3年以上 前

解決済み


Namespace
Create a set of n variable names 'a_1',...,'a_n' The result should be a column oriented cell array of strings. Example inp...

3年以上 前

解決済み


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

3年以上 前

解決済み


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

3年以上 前

解決済み


Leading-zero padding
Write a function that will add leading-zero padding to all numbers in the supplied vector, as necessary, based on the maximum nu...

3年以上 前

解決済み


Logarithm with base other than 'e'
The standard log() function in Matlab returns the natural logarithm (base equal to Euler's constant). Compute the logarithm for ...

3年以上 前

解決済み


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

3年以上 前

解決済み


Find same numbers touching each other...
So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

3年以上 前

解決済み


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

3年以上 前

解決済み


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

3年以上 前

解決済み


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

3年以上 前

解決済み


Largest Prime Number
Given a matrix X, find the largest prime number in X.

3年以上 前

解決済み


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

3年以上 前

解決済み


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

3年以上 前

解決済み


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

3年以上 前

解決済み


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

3年以上 前

解決済み


Percentage profit:2
If you are selling at x dollar, you are facing r1% profit; what will be the selling price for making r2% profit?

3年以上 前

解決済み


Joules to Megatons of TnT
Given joules, J, make a function that converts to megatons of TNT.

3年以上 前

解決済み


Cody Computer Part 5 - Guess the Name of Cody Computer
Network computers have generally a nickname to be identified. Can you guess the nickname of the Cody Computer? No inpu...

3年以上 前

解決済み


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

3年以上 前

解決済み


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

3年以上 前

解決済み


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

3年以上 前

解決済み


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

3年以上 前

解決済み


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

3年以上 前

解決済み


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

3年以上 前

解決済み


Chess ELO rating system
The Elo rating system is a method for calculating the relative chess skill levels of players in competitor-versus-competitor gam...

3年以上 前

解決済み


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

3年以上 前

解決済み


Energy Conversion 2

3年以上 前

解決済み


Energy Conversion 1

3年以上 前

さらに読み込む