Solved


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

meer dan een jaar ago

Solved


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

meer dan een jaar ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

meer dan een jaar ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

meer dan een jaar ago

Solved


Space Saver
Remove all characters that are below a space in ASCII value.

meer dan een jaar ago

Solved


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

meer dan een jaar ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

meer dan een jaar ago

Solved


Special Relativity 101.
Special relativity states that the effective mass of an object varies as a function of its velocity. If *c* is the speed of ligh...

meer dan een jaar ago

Solved


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

meer dan een jaar ago

Solved


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

meer dan een jaar ago

Solved


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

bijna 2 jaar ago

Solved


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

meer dan 2 jaar ago

Solved


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

meer dan 2 jaar ago

Solved


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

meer dan 2 jaar ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

meer dan 2 jaar ago

Solved


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

meer dan 2 jaar ago

Solved


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

meer dan 2 jaar ago

Solved


square of a number
find square of a given number

meer dan 2 jaar ago

Solved


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

meer dan 2 jaar ago

Solved


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

meer dan 2 jaar ago

Solved


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

meer dan 2 jaar ago

Solved


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

meer dan 2 jaar ago

Solved


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

meer dan 2 jaar ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

meer dan 2 jaar ago

Solved


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

meer dan 2 jaar ago

Answered
Wildcard '*' not working for "isfile" or renaming using "move file" commands.
I frequently need all of the FITS image files from a directory, and so I've gotten used to using the "dir" function. It seems li...

bijna 3 jaar ago | 0

| accepted

Solved


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

bijna 3 jaar ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

bijna 3 jaar ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

bijna 3 jaar ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

bijna 3 jaar ago

Load more