Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2 3; 4 5 6];
and ...
8年以上 前
解決済み
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
8年以上 前
解決済み
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.
8年以上 前
解決済み
ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters.
EXAMPLE
If input is 'Abbreviation of The Given String' then ou...
8年以上 前
解決済み
Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example,
s='achyuta'
output='AcHyUtA'
most frequent character
Obtain the most frequent character.
For example,
s='balaram';
output='a';
If there is a tie between letters, return t...
8年以上 前
解決済み
NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...
8年以上 前
解決済み
Concatenate strings
concatenate a variable number of input strings to produce one outputstring
8年以上 前
解決済み
Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody.
Given a string that is the name of a MATLAB function, return a s...
8年以上 前
解決済み
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...
8年以上 前
解決済み
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...