Solved


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

11 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

11 years ago

Solved


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

11 years ago

Solved


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

11 years ago

Solved


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

11 years ago

Solved


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

11 years ago

Solved


Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

11 years ago

Solved


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

11 years ago

Solved


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

11 years ago

Solved


Radiation Heat Transfer — View Factors (5)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

11 years ago

Solved


Radiation Heat Transfer — View Factors (4)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

11 years ago

Solved


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

11 years ago

Solved


Find out phase angle of second order system.
Find out the phase angle of a second order system. In a control system, the phase angle is given by the inverse of cos.

11 years ago

Solved


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

11 years ago

Solved


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

11 years ago

Solved


Find out DC Gain of transfer function
Find out DC Gain of transfer function Example, G(s)=5/ (s+2), then DC gain is 2.5 (put s=0) *Request: If you like this pr...

11 years ago

Solved


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

11 years ago

Solved


Count number of words in string
Count number of words in string E.g. 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

11 years ago

Solved


Find the distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

11 years ago

Solved


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

11 years ago

Solved


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

11 years ago

Solved


Simulate one complete step in the Biham–Middleton–Levine traffic model
The <http://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model Biham–Middleton–Levine traffic model> is ...

11 years ago

Solved


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

11 years ago

Solved


FloydWarshall
Our task is to find shortest paths between every pair of nodes. Floyd-Warshall is a graph algorithm for finding shortest paths i...

11 years ago

Solved


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

11 years ago

Solved


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and...

11 years ago

Solved


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

11 years ago

Solved


Ulam spiral 2: The revenge
Starting from the problem <https://www.mathworks.com/matlabcentral/cody/problems/2644-the-ulam-matrix>, transform the Ulam Matri...

11 years ago

Solved


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

11 years ago

Solved


Dispatch and collect
Write a function that dispatches the single argument _x_ to multiple function handles (varargin) and concatenates vertically the...

11 years ago

Load more