Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer:
e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2
3年弱 前
解決済み
Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody.
Return the number of punctuation characters in the input variabl...
3年弱 前
解決済み
Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody.
Return the class of the input variable.
3年弱 前
解決済み
prime test 2
enter the only non prime,non composite number
Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
3年弱 前
解決済み
Roll the Dice!
*Description*
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
*Example*
[x1,x2] =...
3年弱 前
解決済み
Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...
3年弱 前
解決済み
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example:
[q,r] = swap(5,10)
returns q = ...
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Example...