Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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.

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

4 mesi fa

Risolto

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

8 mesi fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

square of a number
find square of a given number

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

Risolto

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

circa un anno fa

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

oltre un anno fa | 0

| accettato

Risolto

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

oltre un anno fa

Risolto

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

oltre un anno fa

Risolto

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

oltre un anno fa

Risolto

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

oltre un anno fa

Risolto

Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

oltre un anno fa