解決済み


Array Concatenation (1)
Given two matrices, a and b, concatenate the two matrices horizontally, i.e., the number of columns of the result should be equa...

2年以上 前

解決済み


Multiply by 5
Given an input x (scalar), multiply it by 5.

2年以上 前

解決済み


Find the mean of the magic x
Given a x term, find the magic x, then find the mean/average of any one row or column.

2年以上 前

解決済み


How many offices does MathWorks have in the UK
Please write a function that returns the number of offices MathWorks has in the UK.

2年以上 前

解決済み


Check for armstrong number
Given a number, check if it is an armstrong number. Eg: n = 371 Output: 1 Eg: n = 75 Output: 0

2年以上 前

解決済み


Matrix symmetry
Given a matrix A = [1 2 3; 4 5 6] Flip it horizontally and vertically to obtain a complete reversal of both rows and columns. ...

2年以上 前

解決済み


Magnitude with vargin
Magnitude with an undefined amount of arguments

2年以上 前

解決済み


Find cross product of 2 vectors
Find cross product of 2 vectors

2年以上 前

解決済み


How many revolutions around the earth
Calculate how many revolutions you will around the earth till 1/1/2100. Given the birhdate find your age in number of days on 1...

2年以上 前

解決済み


Find sum of alternate numbers in a vector
Find sum of alternate numbers in a vector starting from index 1

2年以上 前

解決済み


convert 24 hour time to 12 hour time
convert 24 hour time to 12 hour time Input: '13:12' Output: '01:12 PM' Input: '06:12' Output: '06:12 AM'

2年以上 前

解決済み


Alternate Arrangement
Determine the ways of arranging 'm' men and 'w' women alternatively in a row of 's' seats. Assumptions : s<m and s<w

2年以上 前

解決済み


Find collatz series next number
For given x, if x is even, output is (x/2) if x is odd, output is (3x+1)

2年以上 前

解決済み


Bag of apples
find probabilty of getting red apples from a bag of 'r' red and 'g' green apples.

2年以上 前

解決済み


Build the Well
Calculate the total time taken for building 'n' wells given : Worker A takes a hr to build the well alone Worker B takes b hr...

2年以上 前

解決済み


Add Even and Subtract Odd Numbers in an Array
For an input array, add all the even values and subtract the odd values. This final value is the output. E.g. input = [1 2 3 4...

2年以上 前

解決済み


Add Odd and Subtract Even Numbers in an Array
For an input array, add all the odd values and subtract the even values. The final value is the output. E.g. input = [1 2 3 4 ...

2年以上 前

解決済み


Is it the answer to life the universe and everything?
The answer to life the universe and everything is 42, but this is naturally in base 13. Unfortunately, MATLAB is in base 10, so ...

2年以上 前

解決済み


A times B
A times B

2年以上 前

解決済み


Find the surface area of a cone.
For instance, Given r (radius) = 3, and s (slant height) = 5: surface area should be 94.

2年以上 前

解決済み


Fibonacci Sequence
Write a MATLAB function called fibonacci_sequence(n) that takes an integer n as input and returns the first n terms of the Fibon...

2年以上 前

解決済み


Determine if input is greater than pi
Evaluate if given number is greater than pi. If greater, return true; else, return false.

2年以上 前

解決済み


Determine if input is greater than 100
Evaluate if given number is greater than 100. If greater, return true; else, return false.

2年以上 前

解決済み


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

2年以上 前

解決済み


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

2年以上 前

解決済み


Where the Four Corners Am I? (Vectorized)
NOTE: this problem is intended to build on problem #55960 ("Where the Four Corners Am I?"). You may wish to solve that problem f...

2年以上 前

解決済み


Where the Four Corners Am I?
The "Four Corners" region of the US is where Colorado, Utah, Arizona, and New Mexico all meet - the only place where four states...

2年以上 前

解決済み


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

2年以上 前

解決済み


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

2年以上 前

解決済み


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

2年以上 前

さらに読み込む