Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
約6年 前
解決済み
Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...
約6年 前
解決済み
Complex number
For complex number c=a+bi, write code that will add a and b together.
約6年 前
解決済み
Building matrices
If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4;
5 6 7 8...
ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122
約6年 前
解決済み
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
約6年 前
解決済み
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...
約6年 前
解決済み
Rounding
Round 10.67 and make 'y' equal to that number.
約6年 前
解決済み
Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9]
Replace the 2nd row with 8s
**remember to create matrix G
約6年 前
解決済み
Flipping
Write code that can reverse the vector without using any sort of loop.
Example
Given the input vector
A = [ 1 2 3 4 5...
Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody.
Return a cell array of strings of all MATLAB keywords.
約6年 前
解決済み
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector of numbers, output a square array with the...
約6年 前
解決済み
Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive floating-point number MATLAB can han...
約6年 前
解決済み
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
約6年 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
約6年 前
解決済み
Summing Digits within Text
Given a string with text and digits, add all the numbers together.
Examples:
Input str = '4 and 20 blackbirds baked in a...