Convert a Cell Array into an Array
Given a square cell array:
x = {'01', '56'; '234', '789'};
return a single character array:
y = '0123456789'
3달 전
해결됨
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following:
* ...
3달 전
해결됨
Is My Wife Wrong?
Answer the question.
(see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...
3달 전
해결됨
Area of a Square
Inside a square is a circle with radius r.
What is the area of the square?
3달 전
해결됨
Area of a disk
Find the area of a disk or circle.
x= radius of the disk.
3달 전
해결됨
Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter.
For example:
x = [1 ...
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
3달 전
해결됨
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
3달 전
해결됨
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as
|y = A.ⅇ^(-λt)*cos(2πft)|
where |A|, |λ|, and |f| ...
3달 전
해결됨
Solve a System of Linear Equations
*Example*:
If a system of linear equations in _x₁_ and _x₂_ is:
2 _x₁_ + _x₂_ = 2
_x₁...
3달 전
해결됨
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...
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
4달 전
해결됨
Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice.
Ex...
4달 전
해결됨
De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...
4달 전
해결됨
Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point.
Exampl...
4달 전
해결됨
Remove and Sort
Given a randomized array n, sort it and remove all odd integers.
n=5
y = [2 4]
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.