Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Creating Gaussian pulses using RF Module and LiveLink™ for MATLAB®

Please login with a confirmed email address before reporting spam

Dear All

I knew that all aspects of COMSOL Multiphysics® modeling can be controlled using LiveLink™ for MATLAB®.

LiveLink™ for MATLAB® allows me to change physics settings.

I am using the RF module- Electromagnetic Waves, Frequency Domain, as shown in the attached COMSOL file.

I want to create several Gaussian pulses. These pulses should be applied from an input Port, (Port 1 is a port input power).

Would you please show me how to create a number of different Gaussian pulses via LiveLink™ for MATLAB®?



2 Replies Last Post 23 sept. 2022, 07:58 UTC−4
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 16 sept. 2022, 07:51 UTC−4
Updated: 2 years ago 26 sept. 2022, 09:11 UTC−4

The easiest way to achieve this is to add a Gaussian Pulse to your model by clicking on Global Definitions and selecting Functions->Gaussian Pulse. Fill in the necessary settings for your pulse (either usign hard coded numerical values or parameter names). Update your settings in the model such that the newly created Gaussian Pulse is used.

Save your model as an M-file by selecting Save as on the File menu. In the drop down box Save as type select "Model file for Matlab".

Open the saved M-file in the Matlab editor. At the end of the file you can see the commands that corresponds to defining and using the Gaussian Pulse in your model.

-------------------
Lars Gregersen
Comsol Denmark
The easiest way to achieve this is to add a Gaussian Pulse to your model by clicking on Global Definitions and selecting Functions->Gaussian Pulse. Fill in the necessary settings for your pulse (either usign hard coded numerical values or parameter names). Update your settings in the model such that the newly created Gaussian Pulse is used. Save your model as an M-file by selecting Save as on the File menu. In the drop down box Save as type select "Model file for Matlab". Open the saved M-file in the Matlab editor. At the end of the file you can see the commands that corresponds to defining and using the Gaussian Pulse in your model.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23 sept. 2022, 07:58 UTC−4

Dear Lars

Many thanks for your responce,

Yes I followed your advice and now my simulation works very well, thanks a lot.

Best regards, Manal

Dear Lars Many thanks for your responce, Yes I followed your advice and now my simulation works very well, thanks a lot. Best regards, Manal

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.