MATLAB MATLAB: Importing Files and Creating Contours

  • Thread starter Thread starter MathematicalPhysics
  • Start date Start date
  • Tags Tags
    files Matlab
AI Thread Summary
To visualize the results of a C++ simulation of charge dissipation in MATLAB, the user has successfully imported a matrix of numerical data representing equipotentials from a text file. After importing the data, the user seeks guidance on how to create contour plots without needing to learn MATLAB extensively. A suggestion is made to use the command "help contour" in the MATLAB command window for assistance with the contour function, which is essential for generating the desired visual representation of the data. The focus remains on efficiently utilizing MATLAB to enhance the project by creating visual outputs of the simulation results.
MathematicalPhysics
Messages
40
Reaction score
0
Hey! I am using c++ to simulate charges dissipating. I've written the output to a file in the form of a matrix, so in the file is just a matrix of numbers showing equipotentials etc.

I want to show the contours by using MATLAB. I'm not used to working in MATLAB but I tried! I clicked file --> import data, then pointed it to the output file from c++ (just a .txt file).

After clicking next a few times it appears to have imported the correct file.

Now what do I do? Reading textbooks, I gather its something like:

>contour(...)

Im really not sure about this! I hope I don't have to start learning MATLAB from the beginning just to work this out! The point of my project is to use c++ to work out the charge dissipation, which I've done but wouldn't it be nice to have some pictures?!

Thanks in advance,

Matt
 
Physics news on Phys.org
MathematicalPhysics said:
Hey! I am using c++ to simulate charges dissipating. I've written the output to a file in the form of a matrix, so in the file is just a matrix of numbers showing equipotentials etc.

I want to show the contours by using MATLAB. I'm not used to working in MATLAB but I tried! I clicked file --> import data, then pointed it to the output file from c++ (just a .txt file).

After clicking next a few times it appears to have imported the correct file.

Now what do I do? Reading textbooks, I gather its something like:

>contour(...)

Im really not sure about this! I hope I don't have to start learning MATLAB from the beginning just to work this out! The point of my project is to use c++ to work out the charge dissipation, which I've done but wouldn't it be nice to have some pictures?!

Thanks in advance,

Matt

You can writte "help contour" on the command window.
 

Similar threads

Replies
3
Views
1K
Replies
2
Views
3K
Replies
1
Views
2K
Replies
7
Views
8K
Replies
22
Views
4K
Replies
4
Views
2K
Replies
4
Views
2K
Back
Top