Risolto


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

oltre 8 anni fa

Risolto


Determine value using Look-up table method
Given a set of 2 vectors x and y related in a certain way, you are supposed to find value of y (ydash) given a particular value ...

oltre 8 anni fa

Risolto


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

oltre 8 anni fa

Risolto


Create tangent function out of sin and cos
Please don't use tan(x) directly

oltre 8 anni fa

Risolto


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

oltre 8 anni fa

Risolto


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

oltre 8 anni fa

Risolto


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

oltre 8 anni fa

Risolto


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

oltre 8 anni fa

Risolto


Rotate Matrix Depending on the input
Rotate matrix (CounterClockwise) via 90, 180 or -90 depending on the input Ex. a = [1 2 3; 4 5 6; 7 8 9] b = 90; ...

oltre 8 anni fa

Risolto


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

oltre 8 anni fa

Risolto


Increment up an input vector
Increment up an input vector by adding the indices to the vector values. For example, if an input vector is [3, 2, 6, 1, 6], the...

oltre 8 anni fa

Risolto


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

oltre 8 anni fa

Risolto


Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

oltre 8 anni fa

Risolto


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

oltre 8 anni fa

Risolto


Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

oltre 8 anni fa

Risolto


Number of primes
Count the number of primes less than 'n'.

oltre 8 anni fa

Risolto


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

oltre 8 anni fa

Risolto


Permutations of input vector
Find and output all permutations of given vector

oltre 8 anni fa

Risolto


Delete blanks at the end of string
you got to delete all blank spaces which appears at the end of string

oltre 8 anni fa

Risolto


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

oltre 8 anni fa

Risolto


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

oltre 8 anni fa

Risolto


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

oltre 8 anni fa

Risolto


raise 1/3
Raise a number to 1/3 power.

oltre 8 anni fa

Risolto


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

oltre 8 anni fa

Risolto


Degrees to Radian
Convert degrees to radians

oltre 8 anni fa

Risolto


Delete x value in given vector y.
Delete x value in given vector y. Exapmle x=5; y=[ 1 2 5 6 74 5 2 5] result=[1 2 6 74 2]

oltre 8 anni fa

Risolto


find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix

oltre 8 anni fa

Risolto


Create a code for XNOR
Given two inputs, output XNOR of those two

oltre 8 anni fa

Risolto


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

oltre 8 anni fa

Risolto


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

oltre 8 anni fa

Carica altro