# How to run FreeFEM++ code in MATLAB with minimum message shown in MATLAB command windows?

**URL:** https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609
**Category:** General Discussion
**Created:** [July 17, 2023, 10:25am UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609 "2023-07-17T10:25:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hezl09](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hezl09](https://community.freefem.org/u/hezl09)
#### Post date: [July 17, 2023, 10:25am UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/1 "2023-07-17T10:25:46Z")

</div>

Hello,  
I’m running MATLAB to execute a FreeFEM++ file. Currently everything is fine, except that I do not want the FreeFEM++ code to be shown in the Matlab command window. Here is an example to explain my question. I execute a FreeFEM++ file titled “FF1.edp” through the following matlab code:

_system(['FreeFem++ ',‘FF1.edp’]);_

There is only one line of code in FF1.edp file, which is as follows:

> cout \<\< “This is my FF+ file!” \<\< endl;

While in the command window of MATLAB, a lot of message appears, as shown in the following screen caption.

 ![1](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/d/d6b3a034f454ec85549c91520fb4c17816c28391.jpeg)

These messages generated from FreeFEM++ are pretty messy, especially in the case if I’m running a file with many lines of code. I wonder if there is a way to minimize the amount of these message, so that I can have a clean command window in MATLAB? Thank you.

---

<div class="post-metadata">

### Author: ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)
#### Post date: [July 17, 2023, 11:26am UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/2 "2023-07-17T11:26:57Z")

</div>

`FreeFrem++ -v 0` should help I think. You can also redirect the output into a file.

---

<div class="post-metadata">

### Author: ![hezl09](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hezl09](https://community.freefem.org/u/hezl09)
#### Post date: [July 17, 2023, 12:55pm UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/3 "2023-07-17T12:55:45Z")

</div>

Very neat solution, it works perfect, thank you!

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [July 17, 2023, 12:56pm UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/4 "2023-07-17T12:56:20Z")

</div>

and add `FreeFrem++ -v 0 -ns` to remove the dump of the script.

the list of freefem parameters

```auto
	-f: [filename] script file name
	-v: [verbosity] level of FreeFEM output (0 - 1000000)
	-nw: no graphics
	-wg: with graphics
	-ne: no edp script output
	-cd: change directory to script directory
	-cdtmp: change directory to /tmp
	-jc: just compile
	-ns: same as -ne
	-nowait: do not wait graphics at the end
	-nc: without console (MS Windows only)
	-log: with console (MS Windows only)
	-wait: wait graphics at the end
	-fglut: [filename] redirect graphics in file
	-glut: [command] use custom glut
	-gff: [command] use custom glut (with space quoting)
	-check_plugin [plugin1,plugin2,...] just try if this plugins are correct
	-?: show help

```

---

<div class="post-metadata">

### Author: ![hezl09](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hezl09](https://community.freefem.org/u/hezl09)
#### Post date: [July 28, 2023, 2:17am UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/5 "2023-07-28T02:17:59Z")

</div>

Hello I have a follow up question. I’m using [Mshdist](https://github.com/ISCDtoolbox/Mshdist) as an external package in FreeFEM++ by using the following command:

> exec(mshdist filename)

Although it works, a lot of output information appears in the command window as well. I wonder how to decrease the level of verbosity for [Mshdist](https://github.com/ISCDtoolbox/Mshdist) as well.

I know that FreeFEM++ has its own function, distance, for similar purpose with [Mshdist](https://github.com/ISCDtoolbox/Mshdist), but it seems that Mshdist is more accurate than distance in some cases.

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [July 28, 2023, 12:00pm UTC](https://community.freefem.org/t/how-to-run-freefem-code-in-matlab-with-minimum-message-shown-in-matlab-command-windows/2609/6 "2023-07-28T12:00:24Z")

</div>

To suppress FreeFem output, use the argument `-v 0` when calling `FreeFem++` or `FreeFem++-mpi`. You will have to look into the documentation of other packages to learn how to suppress outputs from them.
