Solved

Approximate the inverse tangent by power series

Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.

3 years ago

Solved

Check Digit - 02

Given a list of ISBN's, check whether they're valid or not. Prev Prob - <https://www.mathworks.com/matlabcentral/cody/problem...

3 years ago

Solved

Fibonacci Word

F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2...

3 years ago

Solved

Check Digit - 01

The International Standard Book Number (ISBN) is a numeric commercial book identifier that is intended to be unique. It used ...

3 years ago

Solved

Zero

given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

3 years ago

Solved

Count the non-zero elements along the diagonals that are immediately next to the main diagonal

Suppose, you are being told to write a matrix, *a* as input in MATLAB with having the possibility of containing zero and non-zer...

3 years ago

Solved

Compute the cokurtosis of a given portfolio.

As input data, you are given a nObs-by-nAssets matrix _portRet_ of return series for assets in a portfolio along with an nAssets...

3 years ago

Solved

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...

3 years ago

Solved

Where do the maximum number belongs within a 3-D matrix?

Suppose, you are given two variables *a* and *b* as inputs in 2-D format. Find out, where do the maximum number belongs (as out...

3 years ago

Solved

Find the Fourier coefficients os a periodic function

For the a given periodic function, f, calculate the first N Fourier coefficients. The inputs to your function must be one period...

3 years ago

Solved

Determine the perimeter of a three-quarter circle

If a circle has a diameter of x as input value, then show the value of perimeter of the three-quarter circle in output variable ...

3 years ago

Solved

Problem for beginners

Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

3 years ago

Solved

Problem for beginners

M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

3 years ago

Solved

Stairs

Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

3 years ago

Solved

Sub-sequence - 03

Given three sequences, find the length of the longest common subsequence. It is similar to the previous problem -- <https...

3 years ago

Solved

Inscribed circle in a triangle

A circle of radius r is inscribed in a triangle. In the figure, AC=x and BC=y. values of x & y are given. Find the ar...

3 years ago

Solved

Sub-sequence - 02

Given two sequences, find the length of the longest common subsequence. a=[1,1,1,1,1,2,3,1,4] b=[2,3,0,0,9,5,4,1] longe...

3 years ago

Solved

Sub-sequence - 01

Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

3 years ago

Solved

Check if is a square

Given four coordinates, write a function to check if they form a square on the XY plane.

3 years ago

Solved

Permutation Via Multiplication

Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...

3 years ago

Solved

Calculate triangle area

Imagine that you want to calculate the areas of some triangles given in matrix form. First the coordinates of the vertices of th...

3 years ago

Solved

Summing Rows and Columns

Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

3 years ago

Solved

"Cody" * 5 == "CodyCodyCodyCodyCody"

*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

3 years ago

Solved

Pipeline

Do something that makes x> f1 > f2 ... > fn equal to fn(...f2(f1(x))...) * x : MATLAB object * fi: function handle ...

3 years ago

Solved

another bullseye

create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

3 years ago

Solved

Find the sum of all integers in a given matrix

Finding sum of all integers in a given matrix

3 years ago

Solved

Find the sum of all integers in a given matrix

Finding sum of all integers in a given matrix

3 years ago

Solved

Squares in Squares - Concentric Squares

Given a number, n, create an n x n sized matrix with concentric squares of 1s from the outside in. There should be a gap between...

3 years ago

Solved

square a number twice with square root of 4/5

square a number twice with square root of 4/5

3 years ago

Solved

Squares of odd numbers upto a given range

Find the squares of odd numbers upto a given range. If Given x=6 return y=(1^2,3^2,5^2) y=1,9,25 If Given x=5 retu...

3 years ago