Sum of series
a(n) = n^2 - (n-1)^2
find the summation of the series upto n i.e.
a(1)+a(2)+...+a(n)
6年弱 前
解決済み
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x.
Examples:
Input x = [1 2 3 4]
Output y is 6
Input...
Create a matrix that counts up diagonally
Given a single input _N_, create a _N_ x _N_ matrix that counts from 1 : _N_ ², (along up-right diagonals, starting with 1 in th...
Four digit number ABCD reversal
write a MATLAB function to find the four-digit number ABCD when multiplied by 4 returns DCBA. The function takes an input x=4.