Solved


Frequencies of prime gaps
Problem statement Given two positive integers n and , write a function which computes the frequency of the gap between two ...

1 year ago

Solved


2) Are you more familiar with iteration methods or Linear Algebra ? Let's see together.
Referring to problem: https://www.mathworks.com/matlabcentral/cody/problems/44530-are-you-more-familiar-with-iteration-method...

1 year ago

Solved


Halder function
Find the halder function value of a number

1 year ago

Solved


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

1 year ago

Solved


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of t...

1 year ago

Solved


Check the 'golden prime squares' equation
Historical context In december 2023, I / Nicolas Douillet was working on prime squares properties and I found* the formula : ...

1 year ago

Solved


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

1 year ago

Solved


Create numeric palindromes and their square roots
Given a number n (1<=n<=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. ...

1 year ago

Solved


Determine if a number (x) is a power of another (n)
If the number x is indeed a power of n, then return true. Otherwise, return false. For example, if x = 9 and n =3, then pow = t...

1 year ago

Solved


Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

1 year ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

1 year ago

Solved


Find the first occurence of a given gap between two consecutive prime numbers
Problem statement Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. E...

1 year ago

Solved


Determine if input is greater than 100
Evaluate if given number is greater than 100. If greater, return true; else, return false.

1 year ago

Solved


Voltage in a lamp
A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

1 year ago

Solved


Unusual Concatenations
The sum of the squares of certain unusual integers is equal to the concatenation of their individual digits. For example: ...

1 year ago

Solved


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

1 year ago

Solved


You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

1 year ago

Solved


Count of Unique Elements of a Vector
Count the number of times each unique element appears in a vector. Example: Input x = [2 9 1 2 4 9 2] Output y = [1 1; 2 3; 4...

1 year ago

Solved


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

1 year ago

Solved


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

1 year ago

Solved


Matrix indexing with two vectors of indices (★★)
(copy of Prob 589) Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)). Thus, if...

1 year ago

Solved


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

1 year ago

Solved


Coefficient of Static friction
The coefficient of static friction between two surfaces is u. What force must be used to move a W lb. crate on a horizontal sur...

1 year ago

Solved


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

1 year ago

Solved


Find the coefficients for numerical integration using Simpson's rule
For using numerical integration using Simpson's rule, we need some coefficients to be determined first. Suppose the n is the nu...

1 year ago

Load more