Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n.
Example
For n = 2
then sum of squares = 5 (1^2 + ...
26日 前
解決済み
Zero or hero
A number will be given as an input. You can be hero if it's not zero.
(Just for fun)
26日 前
解決済み
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 ...
26日 前
解決済み
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...
26日 前
解決済み
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...
Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n.
For example:
v=[1 2 3 4 5 6]
n=3
vNew =...
26日 前
解決済み
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...
26日 前
解決済み
matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)
26日 前
解決済み
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
1:7 -> 0
[7 5 2] -> 1
26日 前
解決済み
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
26日 前
解決済み
Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero?
Clue:
He was the first in the line ...
Double the 2x2 Matrix
In this challenge, you are given a predefined 2x2 matrix called x. Your task is to multiply every element in this matrix by 2 an...