How can I change input of function from file to cell array?
Show older comments
Hi,
I have this function dfaedit_2('filename.csv',0,0,0) and it only takes files as input. I have a cell array with a size of 19x21.
I would like to change the input into a cell array.
When I run it however I get an error:
Error using cumsum
Invalid data type. First input argument must be numeric or logical.
Error in dfaedit (line 44)
Sum = cumsum(x);
Help is much appreciated!
Accepted Answer
More Answers (1)
lil brain
on 27 Jan 2022
0 votes
2 Comments
David Hill
on 27 Jan 2022
function [H]=dfaedit(data)
format short g
H=cell(size(data));%just add this line at the beginning
lil brain
on 27 Jan 2022
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!