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...
7日 前
解決済み
OR
If a greater than zero or c less than 10, b = true, else, b = false.
7日 前
解決済み
MATLAB 101: Area of a circle
Write a MATLAB function named circle_area that accepts the radius r as an input and returns the area of the circle.
7日 前
解決済み
Count ones
Write a program to count number of ones (1s) in an integer variable input.
For example:
Input x=2200112231
output y=3
I...
7日 前
解決済み
Binary Coder
Take an input number and print the binary value of this number.
Find the Oldest Person in a Room
Given two input vectors:
* |name| - user last names
* |age| - corresponding age of the person
Return the name of the ol...
7日 前
解決済み
AND
If a greater than 0 and n less than 10, b = true, else, b = false.
(Checking a should be in one line by AND special sign in MAT...
7日 前
解決済み
Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x?
Image courtesy of Wikipedia.
10日 前
解決済み
Prime or No
If the number is prime, make theCase = "YES", else, make it "NO".
10日 前
解決済み
Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 .
example:
n=4
ans=
[1 1 1 1
1 0 0 1
...
10日 前
解決済み
Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2)
Example:
x=5
ans=
[1 0 0 0 1
1 0 0 0 1
...
10日 前
解決済み
Sum of series VI
What is the sum of the following sequence:
Σk⋅k! for k=1...n
for different n?
10日 前
解決済み
Rhombus
Get the area of the Rhombus using it's Diagonals.
Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1.
example:
n=3
ans=
[0 1 0
0 1 0
0 1 0]
n=...
10日 前
解決済み
Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1.
example:
x=4
ans=
[0 1 1 1
1 0 0 0
...
10日 前
解決済み
Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit.
Examples:
Input celsiusValue = 100
Output fahrValu...
Resistance of a light bulb
The current through two identical light bulbs connected in series is C Amperes. The total voltage across both bulbs is V Volts....
10日 前
解決済み
All capital?
Are all the letters in the input string capital letters?
Examples:
'MNOP' -> 1
'MN0P' -> 0
MATLAB 101: Replace Negatives with Zero
Write a MATLAB function that takes a numeric array (vector or matrix) of numbers and replaces all negative numbers with zero. Po...
10日 前
解決済み
matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)