0

I work with fcm in MATLAB. I need to turn off logging in command windows. What is the best way to accomplish this?

For example, when I run the command I get the following printed to the MATLAB command window

>> fcm(dok, 7)

Iteration count = 1, obj. fcn = 8.970479 
Iteration count = 2, obj. fcn = 7.197402 
Iteration count = 3, obj. fcn = 6.325579
Iteration count = 4, obj. fcn = 4.586142
Suever
  • 64,497
  • 14
  • 82
  • 101

1 Answers1

1

You can set the fourth element of options array input to 0 to indicate that you don't want to display the results from every iteration.

[centers, U, objfun] = fcm(dok, 7, [2, 100, 1e-5, 0])

Alternately, you can use evalc to suppress all command line output from a function.

[~, centers , U, objfun] = evalc('fcm(dok, 7)');
Suever
  • 64,497
  • 14
  • 82
  • 101
  • The problem is that I only have two inputs. Example: [center,'matrix,obj_fcn] = fcm(dok, 7); – Branislav Pažický Jan 23 '17 at 19:07
  • @BranislavPažický Right, that's why I've used an options vector that uses all default values (shown in the documentation) except for the fourth element. – Suever Jan 23 '17 at 19:08