Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
4年弱 前
解決済み
Elastic Collision 001: 1-D
Elastic Collision of two particles.
<http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision>
Solve Conservat...
4年弱 前
解決済み
Momentum Calculation
A shopping cart of mass 'm1' is traveling with velocity 'u' and collides with a second shopping cart of mass 'm2.' The two shopp...
4年弱 前
解決済み
Summing digits
Given n, find the sum of the digits that make up 2^n.
Example:
Input n = 7
Output b = 11
since 2^7 = 128, and 1 + ...
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example:
Input: n = 7
2^n = ...
約4年 前
解決済み
Do you like your boss?
Do you like your boss?
Answer can be any string!
For example:
Boss = 'Do you like your boss?';
Output = 'yes'
or
...
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...
Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive integer MATLAB can handle.
約4年 前
解決済み
Convert yards to feet
The goal of this script is to convert a value given in yards to feet.
約4年 前
解決済み
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...