Remove the air bubbles from a vector
_*A reduced version of Problem 112*_
Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...
約5年 前
解決済み
Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector
for example
x ...
約5年 前
解決済み
Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.
07 - Common functions and indexing 3
Define _eMat_:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
Create the variable _eMat2_, which is equal to _eMat_ with th...
約5年 前
解決済み
frame of the matrix
Given the matrix M, return M without the external frame.
約5年 前
解決済み
Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...
MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string.
For example
A='harsa';
b='harish'; result '1'
...
Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.
約5年 前
解決済み
Area of square
Find the area of a square whose diagonal length is given as x.
約5年 前
解決済み
Replace Nan!
Replace Nan in the given vector(v) with 9999.
約5年 前
解決済み
count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively.
For example:...
約5年 前
解決済み
Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example
start with x = 1 and y = 3
end with y = 1 and x = 3
Do NOT simply r...
約5年 前
解決済み
Sum of series IV
What is the sum of the following sequence:
Σ(-1)^(k+1) (2k-1)^2 for k=1...n
for different n?
Sum of series II
What is the sum of the following sequence:
Σ(2k-1)^2 for k=1...n
for different n?
約5年 前
解決済み
Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody.
Return as a string the name of the input variable to the functio...
約5年 前
解決済み
Vector of numbers divisible by 3
* Input(n) - any integer
* Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0
Examples:
* n=6...