Swap Characters of a Single Word
Description:
In the given input word, convert the lower case to upper case and vice versa.
A to a, a to A ...
Example:
'Matl...
Find the Best Hotels
Given three input variables:
hotels - a list of hotel names
ratings - their ratings in a city
cutoff - the rating at which yo...
2年弱 前
解決済み
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...
2年弱 前
解決済み
Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|.
Mark the minimum...
2年弱 前
解決済み
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as
|y = A.ⅇ^(-λt)*cos(2πft)|
where |A|, |λ|, and |f| ...
2年弱 前
解決済み
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix
Example
...
Negative Infinity
Round the given array a towards negative infinity.
約2年 前
解決済み
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 ...
約2年 前
解決済み
Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...
約2年 前
解決済み
matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)
約2年 前
解決済み
Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits.
x = 123045;
x_vec = [1 2 3 0 4 5];
I happened upon a trick ...
Energy of an object
Calculate the total mechanical energy of an object.
Total Energy= Potential energy + Kinetic energy
P.E.=m*g*h
K.E.=1/2...
約2年 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody.
Given a string, return true if it is a valid MATLAB variable nam...
Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by:
x = 1/2 gt^2
write a function that calculat...