Risolto


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.

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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]

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


Find the sum of all integers in a given matrix
Finding sum of all integers in a given matrix

quasi 4 anni fa

Risolto


Find the sum of all integers in a given matrix
Finding sum of all integers in a given matrix

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


square a number twice with square root of 4/5
square a number twice with square root of 4/5

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Carica altro