Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...
3ヶ月 前
解決済み
Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation.
Note: the number 4 has no circ...
3ヶ月 前
解決済み
Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given numbe...
3ヶ月 前
解決済み
Tax Calculator
Calculate the tax for a given income.
10% tax is paid for any income up to $2,000.
20% tax is paid for additional income u...
3ヶ月 前
解決済み
Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd
Each vector contain a set of integers, where VecEnd(j)>=VecStar...
3ヶ月 前
解決済み
High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...
3ヶ月 前
解決済み
Stress-Strain Properties - 3
A brittle material will not exhibit a yield point. In other words, the yield point and failure point coincide. In such cases, th...