# MarKf

Active since 2022

Followers: 0   Following: 0

Programming Languages:
Python, MATLAB, HTML, Shell, Visual Basic
Spoken Languages:
English, French, German, Italian, Spanish
Professional Interests:
Macroeconomics, Neuroscience, Statistics

All

#### Feeds

View by

Solved

A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

Solved

Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

Solved

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

ungefär ett år ago

Solved

Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

ungefär ett år ago

Solved

Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

ungefär ett år ago

Solved

Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

ungefär ett år ago

Solved

Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

ungefär ett år ago

Solved

Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

ungefär ett år ago

Solved

Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

mer än ett år ago

Solved

Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

mer än ett år 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 ...

mer än ett år ago

Solved

Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

mer än ett år ago

Solved

All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

mer än ett år ago

Solved

Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

mer än ett år ago

Solved

Rule of mixtures (composites) - upper bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

mer än ett år ago

Solved

Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

mer än ett år ago

Solved

Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

mer än ett år ago

Solved

Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317. In a geometric series, ratio of adjacent elements is always a constant value. ...

mer än ett år ago

Solved

geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

mer än ett år ago

Solved

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

mer än ett år ago

Solved

Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

mer än ett år ago

Solved

Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

mer än ett år ago

Solved

Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

mer än ett år ago

Solved

SatCom #1: Wavelength of an electomagnetic wave
*Satellite and Space Engineering - Problem #1* _This is the first of a series of problems looking at topics in satellite and ...

mer än ett år ago

Solved

arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

mer än ett år ago

Solved

IQpuzzler Challenge #2: Find all possible solutions on an empty 4-by-5 board with 5 pieces, rotating and flipping pieces allowed
We are playing a simplified version of IQpuzzler, with a smaller board of 4-by-5 spaces and just 5 pieces, as shown in the pictu...

mer än ett år ago

Solved

IQpuzzler Preparation #3: Detect isolated groups of zeros in a matrix
Return true if any isolated groups of zeros (shapes 1x1, 1x2, 2x1, 1x3, 3x1 or 2x2) are present on the board, with all verticall...

mer än ett år ago

Solved

Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

mer än ett år ago

Solved

Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

mer än ett år ago

Solved

Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

mer än ett år ago