解決済み


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

11ヶ月 前

解決済み


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

11ヶ月 前

解決済み


prime test
find largest 2 digit prime number

11ヶ月 前

解決済み


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

11ヶ月 前

解決済み


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

11ヶ月 前

解決済み


Prime Ladders
A <http://en.wikipedia.org/wiki/Word_ladder word ladder> transforms one word to another by means of single-letter mutations. So ...

11ヶ月 前

解決済み


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

11ヶ月 前

解決済み


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA' Update - Test case...

11ヶ月 前

解決済み


Area of square
Find the area of a square whose diagonal length is given as x.

11ヶ月 前

解決済み


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

11ヶ月 前

解決済み


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

11ヶ月 前

解決済み


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

11ヶ月 前

解決済み


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

12ヶ月 前

解決済み


free points
function y = your_fcn_name(x) y = x(1)+x(2); end

12ヶ月 前

解決済み


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

12ヶ月 前

解決済み


Create vector as shown in test cases
Create vector as shown in test cases

12ヶ月 前

解決済み


Generate pi using logarithm
Generate pi using logarithm

12ヶ月 前

解決済み


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

12ヶ月 前

解決済み


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

12ヶ月 前

解決済み


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

12ヶ月 前

解決済み


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

12ヶ月 前

解決済み


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

12ヶ月 前

解決済み


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

12ヶ月 前

解決済み


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

12ヶ月 前

解決済み


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

12ヶ月 前

解決済み


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

12ヶ月 前

解決済み


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

12ヶ月 前

解決済み


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

12ヶ月 前

解決済み


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

12ヶ月 前

解決済み


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

12ヶ月 前

さらに読み込む