解決済み


Find the sum of n squares
What is the sum of the squares of the first n integers?

約6年 前

解決済み


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

約6年 前

解決済み


find the relation...
if given input is 1, output is 4. if input is 55, output is 3136.

約6年 前

解決済み


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

約6年 前

解決済み


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

約6年 前

解決済み


Crate a vector of logarithmically spaced
Create a vector of logarithmically spaced from 10^0 to 10^x with n sample Example: if x=4 and n=3 Answer must be=[1 100 10...

約6年 前

解決済み


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

約6年 前

解決済み


Find out Harmonic mean.
Find out Harmonic mean.

約6年 前

解決済み


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

約6年 前

解決済み


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

約6年 前

解決済み


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

約6年 前

解決済み


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

約6年 前

解決済み


Find elements of set A those are not in set B
Given two sets of data A and B. Find elements of A those are not in set B. ...

約6年 前

解決済み


Values in Array
How many values are in the array

約6年 前

解決済み


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

約6年 前

解決済み


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

約6年 前

解決済み


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

約6年 前

解決済み


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

約6年 前

解決済み


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

約6年 前

解決済み


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

約6年 前

解決済み


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

約6年 前

解決済み


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

約6年 前

解決済み


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

約6年 前

解決済み


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

約6年 前

解決済み


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

約6年 前

解決済み


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

約6年 前

解決済み


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

約6年 前

解決済み


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

約6年 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

約6年 前

解決済み


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

約6年 前

さらに読み込む