A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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.

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

presque 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


square of a number
find square of a given number

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A répondu
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...

presque 3 ans il y a | 0

| A accepté

A résolu


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

presque 3 ans il y a

A résolu


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

presque 3 ans il y a

A résolu


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

presque 3 ans il y a

A résolu


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

presque 3 ans il y a

Charger plus