473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to read a spice nelist file(*.sp) and turn the schematic into a matrix?

I am a c++ beginner. how can i read a *.sp file which discribe a
schematic file,including subcircuits,resistance, capacitance and
inductance, and then i need to turn the information i get to a matrix
of G,C,L.
Should i use struct lists ?how can i read a line and get the
element's two end's node information and parameter?from characters to
data?
Hoping someone to help me, thank u!

Oct 16 '05 #1
2 3663
wow, i'm not a C++ beginner and can't understand what you are trying to
do.
Let me try to:
You have a file in a specific format, and you want to read the
information from the file, parse according to the format, and than
store the information on the memory so you can use it in your program?
If that is thet case, you should read the file line by line using some
io functions, and than parse the string you have in your hand. that you
can do using scanf the its siblings.
Then you should figure the best way to represent the information. That
depends in what do you wanna do with it afterwards. So if you can,
please elaborate on the matter.

Oct 16 '05 #2
ok.I will try, thank u.
Maybe i could use the function "sscanf".

Oct 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: maxwell | last post by:
I used to program in matlab An read an image file with : fread(a,,0) which gave me a matrix of 256*256 full of numbers which were the pidxel values from 0 to 256. How do i do the same in c++ ...
6
by: memocan | last post by:
#include <iostream> using namespace std; int x; //global variable matrix int main() { x= new float ; //initialize the size now }
6
by: kilter | last post by:
Anyone know of a routine that will return the number of rows and columns in a matrix?
1
by: TahoeKid | last post by:
Not sure where to post this, so I'll start here. I'm looking for an SDK for commercial product that can be used to create a program that creates drawing objects with line connections, and that it...
4
emaghero
by: emaghero | last post by:
Afternoon all, I am programming in C++ and I wish to output the result of my numerical calculations to a txt file. I have a vector (one-dim array) that holds a list of numbers. This is output...
4
by: matkok | last post by:
Hello guys, I'm not very expert in programming stuff. I need your help. I have to extract data from a file (signal.txt) where I have 2 columns and 100 rows. The first column is associated to time...
3
by: Alfonso Acosta | last post by:
Hi all, I'm developing a System Description Language (which could be used as an HDL in particular) called ForSyDe: http://www.ict.kth.se/info/FOFU/ForSyDe/ I'm planning to add a backend to my...
3
by: craziileeboi | last post by:
Hi I have been pulling my hair out trying to figure this out. Please help!!! Here is my project description: By using a pointer to pointers **A and **B and the function calloc() allocate...
2
by: Encrypted | last post by:
i am working with a matrix manipulation program...consists of a matrix class and its member functions.. i have also overloaded << and >>...so dat dey can read and print d whole matrix at one...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.