# matlab avoid plot to get focus

In Matlab, if you want to avoid plotting to maintain focus, you can use the `hold`

function with the value of `'off'`

. This will prevent any new plots from being displayed. Here's an example:

```
x = 1:10;
y = x.^2;
% Turn off plotting
hold off;
% Perform calculations without plotting
z = sum(y);
% Turn on plotting if needed
hold on;
% Plot the result
plot(x, y);
```

By using `hold off`

before performing calculations, you can avoid any plots from being displayed. Then, you can turn on plotting again using `hold on`

if you want to display a plot later on.

Please let me know if you need further assistance!