What percentage?
Calculate the output c as the percentage of a on b for given a and b.
約2年 前
解決済み
Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody.
Return a cell array of all MATLAB keywords
約2年 前
解決済み
Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F.
Examples:
Input F = 90
Output C is 32.22
I...
約2年 前
解決済み
square root
Find the square root (y) of an input (x).
約2年 前
解決済み
05 - Vector Equations 1
Define the vector _cVec_:
<<http://samle.dk/STTBDP/Assignment1_2c.png>>
(all the numbers from 5 to -5 in increments of -0....
約2年 前
解決済み
Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix
Grades=[98 56 34 100 88 87]
**re...
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
約2年 前
解決済み
Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row.
This also applies...
約2年 前
解決済み
pressure to dB?
given x ratio of pressure, find corresponding y dB
約2年 前
解決済み
Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.
約2年 前
解決済み
Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1.
Example:
A = [1 2 3 -1 0 2 -3 -80];
...
約2年 前
解決済み
04 - Scalar Equations 3
Define the variables a, b, and c:
<<http://samle.dk/STTBDP/Assignment1_4-a.png>>
<<http://samle.dk/STTBDP/Assignment1_4-b....
Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros.
Exam...
How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1.
Examples:
Input...
約2年 前
解決済み
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...