C/C++ [Ask] How to write laplace transform in c or c++ ?

Click For Summary
To implement a Laplace transform in C or C++, the discussion suggests using float data types for variables. The example provided, T(s) = 1/(s+1), can be calculated by prompting the user for the value of 's' and then performing the calculation using simple arithmetic. The formula can be expressed as final = (1/s) + 1, and the result can be printed using printf. For more complex symbolic manipulations or numerical computations, it is recommended to consider using a dedicated library or sticking with MATLAB, as it is more suited for such tasks. If further issues arise, participants are encouraged to seek additional help.
khayabi
Messages
1
Reaction score
0
[Ask] How to write laplace transform in c or c++ ??

Hi Guys..
if I have a laplace transform example : T(s) = 1/s+1. It's easy to solve or write in Matlab, but how to write it in C programm ??

thanks
:)
 
Technology news on Phys.org


khayabi said:
Hi Guys..
if I have a laplace transform example : T(s) = 1/s+1. It's easy to solve or write in Matlab, but how to write it in C programm ??

thanks
:)

Take all variable with float data type.
Take s from user.
tempstore = (1/s);
final = tempstore+1;

or can be written as

final = (1/s) + 1;
printf("%f",final);
getch();
}

If problems still persist then tell me.
 


Welcome to PhysicsForums!

Are you asking how to implement a Laplace transform, how to use and manipulate it symbolically in systems analysis (as in MATLAB), or how to produce values for various s values as Keyur suggests?

If the first, you can probably find a library that can do a numerical Laplace transform. If the second, you should probably stick to MATLAB, and if the third, well, there's something above.
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
7
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K