Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

cell2str.m 475 B

12345678910111213141516171819202122
  1. function f = cell2str(m)
  2. % function f = cell2str(m)
  3. %
  4. % <m> is a 2D cell matrix with elements that are number-matrices or strings.
  5. %
  6. % return the string that can be evaluated to obtain <m>.
  7. %
  8. % example:
  9. % a = {1 [5 6 7]; ':' 'df'};
  10. % isequal(cell2str(a),'{ 1 [5 6 7]; '':'' ''df'';}')
  11. % isequal(a,eval(cell2str(a)))
  12. % do it row by row
  13. f = '{';
  14. for p=1:size(m,1) % POTENTIALLY SLOW
  15. for q=1:size(m,2)
  16. f = [f ' ' mat2str(m{p,q})];
  17. end
  18. f = [f ';'];
  19. end
  20. f = [f '}'];