User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...
約9年 前
解決済み
Count number of words in string
Count number of words in string
Examples
'hi', answer is 1
'hi hi', answer is 2
'I enjoy cody', answer is 3
約9年 前
解決済み
multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...
約9年 前
解決済み
Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
Test of Quiz
Answer the questions and write in vector. Only one answer is correct.
The founder of fuzzy logic is
1a) D. Golberg
1b)...
約9年 前
解決済み
metre to feet converter
The idea is to make a converter, which exchange meters to feets.
We use a factor of 1m = 3.281*1f.
so 3m are equals to 9.843 m...
A quadrant matrix
Write a function called quadrants that takes as its input argument a scalar integer named n. The function returns Q, a 2n-by-2n ...
約9年 前
解決済み
Basic commands - amount of inputs
Make a function, which will return amount of given inputs
Example:
amountinput(1,2,4,3,10) -> 5 , because we gave functio...
Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n.
Example
x= [ 1 2 3...
THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...
約9年 前
解決済み
Reverse a string
Reverse the given string.
Example
input = 'reverse'
output = 'esrever'