Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

10 years ago

Solved


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

10 years ago

Solved


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

10 years ago

Solved


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

10 years ago

Solved


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

10 years ago

Solved


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

10 years ago

Solved


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

10 years ago

Solved


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

10 years ago

Solved


The rabbit problem
Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

10 years ago

Solved


Calculate the nth Fibonacci number USING 'Golden Ratio' concept
f = [1 1 2 3 5 8 13 ...] If n=6, f(6)=8

10 years ago

Solved


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

10 years ago

Solved


Narcissistic problem
How many likes has this problem?

10 years ago

Solved


How many solutions has this problem?
Guess, predict or calculate :-) (You will be scored by the accuracy). Update: <http://www.mathworks.co.uk/matlabcent...

10 years ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

10 years ago

Solved


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

10 years ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

10 years ago

Answered
interpolation x,y coordinate
write |cftool| on the Command Window to use the Curve Fitting Tool. It works also with surface.

10 years ago | 1

Solved


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

10 years ago

Solved


length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

10 years ago

Solved


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

10 years ago

Solved


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

10 years ago

Solved


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

10 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

10 years ago

Solved


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

10 years ago

Solved


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

10 years ago

Solved


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

10 years ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

10 years ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

10 years ago

Solved


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

10 years ago

Solved


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

10 years ago

Load more