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 ...
約2年 前
解決済み
Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...
約2年 前
解決済み
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have
a = [1 2 2 2 1 ...
Sum of series
a(n) = n^2 - (n-1)^2
find the summation of the series upto n i.e.
a(1)+a(2)+...+a(n)
約2年 前
解決済み
Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55...
約2年 前
解決済み
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
約2年 前
解決済み
Sum of self power series
The series, 1^1,2^2,3^3,4^4,....
Find the sum of such series when x terms are given.
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...
Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row
約2年 前
解決済み
Product of Array
Given an array of numbers. Get the product of the array.
約2年 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
約2年 前
解決済み
Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n.
Example
For n = 2
then sum of squares = 5 (1^2 + ...
約2年 前
解決済み
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
約2年 前
解決済み
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
約2年 前
解決済み
Replace 0 to NaN!
In given matrix
A=[1 nan nan; 2 2 nan; nan nan 1];
replace NaN to 0. Use matrix A as a input.
約2年 前
解決済み
prime test 2
enter the only non prime,non composite number