Negative Infinity
Round the given array a towards negative infinity.
4年弱 前
解決済み
Area of a disk
Find the area of a disk or circle.
x= radius of the disk.
4年弱 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
4年弱 前
解決済み
Sum of first n positive integers
Given n, find the sum of first n positive integers
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55
04 - Scalar Equations 2
Define the variables a and b:
<<http://samle.dk/STTBDP/Assignment1_4-a.png>>
<<http://samle.dk/STTBDP/Assignment1_4-b.png>...
4年弱 前
解決済み
Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...
4年弱 前
解決済み
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416
4年弱 前
解決済み
Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.
4年弱 前
解決済み
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...
4年弱 前
解決済み
Multiply 2 numbers
Very easy, you just have to multiply 2 numbers
but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...
Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.
4年弱 前
解決済み
Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody.
Given a string, return true if it is a valid MATLAB variable nam...
4年弱 前
解決済み
Unit Matrix
Given n, you should return an n-by-n unit matrix.
Example:
If input is n=2 then
A = [ 1 0
0 1 ]
If input ...
4年弱 前
解決済み
Find the nearest integer
Given a vector of integers and a real number find the closest integer.
EX:
>> a = [2 4 5 6 8 10];
>> b = 4.6;
>> nea...
Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody.
Return a cell array of all MATLAB keywords
4年弱 前
解決済み
Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to get the <http://www.ma...
4年弱 前
解決済み
Clamper Function
Create a function that emulates a clamper circuit
Given sin wave, t and the constant value for clamping
4年弱 前
解決済み
N-th permutation.
Let write some permutations of positive integers.
1: 1 2 3 4 5 6 ...
2: 2 1 3 4 ...
3: 1 3 2 4 ...
...
4年弱 前
解決済み
Which permutation is it?
Let write some permutations of positive integers.
1: 1 2 3 4 5 6 ...
2: 2 1 3 4 ...
3: 1 3 2 4 ....
How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...