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];
...
3ヶ月 前
解決済み
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....
3ヶ月 前
解決済み
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 is n=4 th...
3ヶ月 前
解決済み
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
3ヶ月 前
解決済み
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...
Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody.
Return the class of the input variable.
3ヶ月 前
解決済み
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>...
3ヶ月 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
3ヶ月 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
3ヶ月 前
解決済み
Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.
Convert yards to feet
The goal of this script is to convert a value given in yards to feet.
3ヶ月 前
解決済み
Given area find sides
In a right angle triangle given area 'A'
one arm=x, another arm=2x
then find the value of x.
For example, area A=400 then ...
3ヶ月 前
解決済み
Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...
02 - Vector Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2d.png>>
(Logarithmically spaced numbers between 1 and 1...
3ヶ月 前
解決済み
Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input variable 'x', save it to disk in a file named 'co...
All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...
3ヶ月 前
解決済み
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416