解決済み


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

11年以上 前

解決済み


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

11年以上 前

解決済み


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

11年以上 前

解決済み


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

11年以上 前

解決済み


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

11年以上 前

解決済み


Binary Coder
Take an input number and print the binary value of this number.

11年以上 前

解決済み


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

11年以上 前

解決済み


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

11年以上 前

解決済み


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

11年以上 前

解決済み


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

11年以上 前

解決済み


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

11年以上 前

解決済み


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

11年以上 前

解決済み


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

11年以上 前

解決済み


Generate pi using logarithm
Generate pi using logarithm

11年以上 前

解決済み


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

11年以上 前

解決済み


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

11年以上 前

解決済み


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

11年以上 前

解決済み


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

11年以上 前

解決済み


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

11年以上 前

解決済み


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

11年以上 前

解決済み


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

11年以上 前

解決済み


matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

11年以上 前

解決済み


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

11年以上 前

解決済み


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

11年以上 前

解決済み


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 (http://en.wikipedia.org...

11年以上 前

解決済み


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

11年以上 前

解決済み


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

11年以上 前

解決済み


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

11年以上 前

解決済み


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

11年以上 前

解決済み


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

11年以上 前

さらに読み込む