subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
約9年 前
解決済み
Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...
Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN.
Example:
input: x = [1 2 5 12 10 7]
...
peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%
約9年 前
解決済み
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...
約9年 前
解決済み
07 - Common functions and indexing 1
Define _cMat_:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...
約9年 前
解決済み
Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F.
Examples:
Input F = 90
Output C is 32.22
I...
約9年 前
解決済み
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...
約9年 前
解決済み
Area of a disk
Find the area of a disk or circle.
x= radius of the disk.
約9年 前
解決済み
UICBioE240 problem 1.8
Given a list of grades in a class, write a script that gives the 2nd highest grade in the class and the average for the class.
...
UICBioE240 problem 1.5
Find the size of the matrix, then multiply both values by 10 and make it into a column vector.
So if A = [ 1 2 3;
...
約9年 前
解決済み
UICBioE240 2.3
Make a 4D matrix of 4x4x3x4 containing all zeros.
約9年 前
解決済み
Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places
example:
...
Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.
E...
約9年 前
解決済み
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...
約9年 前
解決済み
Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists.
x = [2 6 4 9 -10 3 1 5 -10];
So
...
約9年 前
解決済み
Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...
UICBioE240 problem 1.18
exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.
約9年 前
解決済み
Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?
約9年 前
解決済み
Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts
example:
a = 1, b = 2
output = 1 1.25 ...