已解决


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

2 years 前

已解决


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...

2 years 前

已解决


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

2 years 前

已解决


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...

2 years 前

已解决


Spherical Volume
Calculate the volume of a sphere.

2 years 前

已解决


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

2 years 前

已解决


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

2 years 前

已解决


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

2 years 前

已解决


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

2 years 前

已解决


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

2 years 前

已解决


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

2 years 前

已解决


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

2 years 前

已解决


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

2 years 前

已解决


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

2 years 前

已解决


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

2 years 前

已解决


modulus of a number
find the modulus of a given number

2 years 前

已解决


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

2 years 前

已解决


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

2 years 前

已解决


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

2 years 前

已解决


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

2 years 前

已解决


Max of a Vector
Write a function to return the max of a vector

2 years 前

已解决


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

2 years 前

已解决


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

2 years 前

已解决


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

2 years 前

已解决


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

2 years 前

已解决


Square a Number
Given an input x, return y, which is equal to the square of x.

2 years 前

已解决


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

2 years 前

已解决


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

2 years 前

已解决


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

2 years 前

已解决


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

2 years 前

加载更多