Reverse the Words (not letters) of a String
*Description*
Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...
約1ヶ月 前
解決済み
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 2 3 ...
Sum of series I
What is the sum of the following sequence:
Σ(2k-1) for k=1...n
for different n?
約1ヶ月 前
解決済み
Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros.
Exam...
約1ヶ月 前
解決済み
Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.
約1ヶ月 前
解決済み
Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody.
Return a cell array of strings of all MATLAB keywords.
約1ヶ月 前
解決済み
Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero?
Clue:
He was the first in the line ...
Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row.
This also applies...
約2ヶ月 前
解決済み
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
約2ヶ月 前
解決済み
Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively
Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input variable 'x', save it to disk in a file named 'co...
約2ヶ月 前
解決済み
Number of 1s in a binary string
Find the number of 1s in the given binary string.
Example. If the input string is '1100101', the output is 4. If the input stri...