Matlab : Function handle givin array to cell array of function handles

Click For Summary
SUMMARY

The discussion centers on converting an array of doubles produced by a function handle into a cell array of function handles in MATLAB. The user is utilizing a built-in MATLAB function to generate the initial function handle but is struggling to manipulate the output effectively. The community suggests that without seeing specific code, it is challenging to provide a precise solution. A common approach involves using anonymous functions to create individual function handles for each component of the array.

PREREQUISITES
  • Understanding of MATLAB function handles
  • Familiarity with MATLAB cell arrays
  • Basic knowledge of MATLAB anonymous functions
  • Experience with MATLAB built-in functions
NEXT STEPS
  • Explore MATLAB documentation on function handles and cell arrays
  • Learn how to create anonymous functions in MATLAB
  • Investigate the use of arrayfun in MATLAB for applying functions to arrays
  • Review examples of converting arrays to cell arrays in MATLAB
USEFUL FOR

MATLAB users, software developers, and data analysts looking to manipulate function handles and arrays effectively within MATLAB.

espen180
Messages
831
Reaction score
2
Hi.

I am currently in a situation where I have a function handle giving as putput an array of doubles. I would like to convert this to a cell array of function handles, each giving a component of the previous array.

The original function handle is produced by a built-in MATLAB function, so I don't see an easy way of redefining the function to give me what I want, but maybe there is a trick I am not aware of?

So far, google and the MATLAB documentation have not been of any help.

Any help would be greatly appreciated!
 
Physics news on Phys.org
This isn't enough information; show some code so we can see *specifically* what's going on.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
25K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K