Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a comsol model. I want to draw a few plots for different values of a global parameter called plot_z, e.g. if plot_z can have 5 different values I want to draw 5 different plots, one for each value. In each plot I need to write the value of plot_z parameter in the plot title. I have typed many expressions such as plot_z, $plot_z, %plot_z%, etc. in the plot title text box, but unfortunately none of them worked.

Is it even possible to have the value of a global parameter in plot title?

share|improve this question

closed as off-topic by Christian Clason, Paul Jun 9 '14 at 15:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Hi Mehrdad, and welcome to scicomp! Have you tried asking this question on the official COMSOL forum? – Paul Dec 20 '12 at 5:03
Hi @Paul, well, I am from Iran and as a result of american sanctions against Iran they have suspended my account! – Mehrdad Dec 20 '12 at 15:03
I suspect the answer depends on the version of COMSOL you are working with (since the interaction with Matlab - where such a thing would be easy - changed over time). – Christian Clason Dec 20 '12 at 16:11
I have comsol 4.2. so, Christian, you mean that I need to use matlab for doing this? matlab livelink? – Mehrdad Dec 21 '12 at 6:49

In this scenario I would suggest to use matlab livelink. I'm not aware of how to include these global parameters in the comsol figures without loading it into MATLAB. If you do opt to do it in MATLAB, you could use the following code.:
title(['Your Title',num2str(plot_z)])
You may also need to change your code to address the different parameters, maybe using a for loop.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.