MATLAB map and reduce: functional programming

30 Ansichten (letzte 30 Tage)
Michael Sohnen
Michael Sohnen am 14 Mär. 2021
Beantwortet: Bjorn Gustavsson am 14 Mär. 2021
What is the MATLAB equivalent of python's MAP and REDUCE?

Akzeptierte Antwort

Bjorn Gustavsson
Bjorn Gustavsson am 14 Mär. 2021
You could get parts of the way with cellfun and arrayfun, typically in combination with anonymous functions (fcn = @(x) sin(x)). Then there are at least 2 submissions on the file exchange with functional programming tools: functional-programming-constructs and functional-library. Loren also published a series of posts on this: introduction-to-functional-programming-with-anonymous-functions-part-1, should give some good information.
HTH

Weitere Antworten (0)

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by