MATLAB user since 1987. MathWorker since 1993. Amateur French horn player. MATLAB design and development, image processing algorithms.

Image processing blog: https://blogs.mathworks.com/steve/

Deep learning blog: https://blogs.mathworks.com/deep-learning

Solved

Are all the three given point in the same line?

In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

24 hours ago

Solved

Side of an equilateral triangle

If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

24 hours ago

Solved

Calculate the area of a triangle between three points

Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

1 day ago

Answered

Variable Variation over the same range

I am interpreting your question this way: you would like to compute depth_tot_7 for all possible combinations of the different v...

Variable Variation over the same range

I am interpreting your question this way: you would like to compute depth_tot_7 for all possible combinations of the different v...

1 day ago | 0

Solved

Change a specific color in an image

The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

1 day ago

Solved

Sorting integers by their digits (Level 4)

This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

1 day ago

Solved

Look Up Mapping

Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

1 day ago

Solved

Assignment Problem

Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

1 day ago

Solved

Check if a rotated array was originally sorted

Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

3 days ago

Solved

S-T-R-E-T-C-H I-T O-U-T

You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

3 days ago

Solved

Zero Cross

Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

3 days ago

Solved

generate number in particular way

A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

3 days ago

Solved

Weave two matrices together to form one matrix

Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

4 days ago

Solved

Find longest run

Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

4 days ago

Solved

Sorting integers by their digits (Level 3)

This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

4 days ago

Solved

Sorting integers by their digits (Level 2)

This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

4 days ago

Solved

Sorting integers by their digits (Level 1)

Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

4 days ago

Solved

Find last non-zero in a given dimension

You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

4 days ago

Answered

Combine griddedInterpolants on the same grid

I don't think so. If you have a large number of query points, you might try replacing the Values property of the griddedInterpol...

Combine griddedInterpolants on the same grid

I don't think so. If you have a large number of query points, you might try replacing the Values property of the griddedInterpol...

4 days ago | 0

| accepted

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

5 days ago

Answered

How to plot multiple graphs using the 3 variable array values

Here is one way: h = 0:0.008:0.600; rho = 1000; g = 9.81; F = rho*g*L*(0.5*(h).^2); F1 = F/1000; E = 2.1E11; I = ((0.008)...

How to plot multiple graphs using the 3 variable array values

Here is one way: h = 0:0.008:0.600; rho = 1000; g = 9.81; F = rho*g*L*(0.5*(h).^2); F1 = F/1000; E = 2.1E11; I = ((0.008)...

5 days ago | 1

| accepted

Solved

Find common elements in matrix rows

Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

7 days ago

Solved

Remove all the words that end with "ain"

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

8 days ago

Answered

Switch-case function problem

First variation: fix the switch and case lines and the indexing into cName. switch color(ind) case 0 ...

Switch-case function problem

First variation: fix the switch and case lines and the indexing into cName. switch color(ind) case 0 ...

8 days ago | 1

| accepted

Solved

Project Euler: Problem 4, Palindromic numbers

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

9 days ago

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

9 days ago

Answered

Reversing/Alternatives of function handles

One of the major uses of function handles is for use with functions that operate on other functions. For example, you can use th...

Reversing/Alternatives of function handles

One of the major uses of function handles is for use with functions that operate on other functions. For example, you can use th...

9 days ago | 1

Answered

How to write a pattern for any different values

T = readtable('matlab_question2.csv'); idx = find(diff(T.x)) idx = 119 314 351 3...

How to write a pattern for any different values

T = readtable('matlab_question2.csv'); idx = find(diff(T.x)) idx = 119 314 351 3...

10 days ago | 1

| accepted

Solved

Project Euler: Problem 9, Pythagorean numbers

A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

10 days ago

Answered

Row and Column Interpolations

[Update: based on the comment thread below, it appears that "column interpolation" means something different than what I wrote i...

Row and Column Interpolations

[Update: based on the comment thread below, it appears that "column interpolation" means something different than what I wrote i...

19 days ago | 0