Post Reply 
About the continuous Fourier Transform
12-14-2020, 06:02 AM (This post was last modified: 12-14-2020 11:20 AM by Stevetuc.)
Post: #21
RE: About the continuous Fourier Transform
(12-13-2020 08:33 AM)Aries Wrote:  
(12-10-2020 06:51 AM)dah145 Wrote:  That'll be nice yeah. Thank you.

Hey dah145,
I'm back, here is a simple app:

[Image: fapp1.jpg]

[Image: fapp2.jpg]

First off you define the piecewise function (in an interval equal to a period) like this (say for rect(t) function):

[Image: rect.jpg]

Then you "describe" the function as a matrix (and store it to ff, as requested by the app), like this:

[Image: matrix.jpg]

Lastly, you can apply fourier(ff):

[Image: fourier.jpg]

The graph:

[Image: rect-plot.jpg]

For every row in the matrix (cycle "for"), the program runs the integration and then the results (stored in "s") are counted together.
I hope this can be a valid "starting point", eventually you could do so much more.
Happy XMas to you and everyone here,

Aries Smile

Ive had a stab at translating this for the prime.

Code:

#cas
fourier(ff):=
BEGIN
LOCAL i,n,s,t,fff,a,b,ggg;
0▶s;
rowDim(ff)▶n;
e^(−*w*x)▶ggg;
FOR i from 1 to n
DO
ff[i,1]▶fff;ff[i,2]▶a;ff[i,3]▶b;
s*int(fff*ggg,x,a,b|assumi)▶s
END;
s
END;
#end

The undefined symbol after e^(- in the listing is the imaginary symbol i from the shift keyboard.

Im getting an undefined result from the integration:
[Image: 20201214-054545.jpg]

Edit: I corrected a mistake in the code
s*int(fff*ggg,x,a,b|assumi)▶s should be
s+int(fff*ggg,x,a,b|assumi)▶s
The result is now [x,0,±∞,±∞] in cas and [10.2581355196,0,+Inf,+Inf] in home
Without the assume the result is 1
Needs more work!

After clearing cas vars, I get this result:
Code:
((−i)*e^(i*w*τ/2)+i*e^((−i)*w*τ/2))/w

After applying exp2trig()
[Image: 20201214-111312.jpg]

Updated code with exp2trig included in returned value:
Code:
#cas
fourier(ff):=
BEGIN
LOCAL i,n,s,t,fff,a,b,ggg;
0▶s;
rowDim(ff)▶n;
e^(−*w*x)▶ggg;
FOR i from 1 to n
DO
ff[i,1]▶fff;ff[i,2]▶a;ff[i,3]▶b;
s+int(fff*ggg,x,a,b)▶s
END;
RETURN exp2trig(s)
END;
#end
Find all posts by this user
Quote this message in a reply
12-14-2020, 01:47 PM
Post: #22
RE: About the continuous Fourier Transform
A further reference for the nspire program with plots for common functions:
http://cb.mty.itesm.mx/ma3002/materiales...ier-ti.htm
Find all posts by this user
Quote this message in a reply
12-15-2020, 01:47 AM
Post: #23
RE: About the continuous Fourier Transform
(12-11-2020 03:37 PM)victorvbc Wrote:  
(12-11-2020 12:42 AM)medwatt Wrote:  What exactly does "classroom calculator" mean ? Does it mean you actually sit in a classroom while the teacher/lecturer is teaching and you use the calculator ? Or did you mean a portable calculator that you can use in a place like a library when you don't want to carry your laptop ? If you meant the former, then I just cannot imagine someone having time to focus on the lecture and then busy himself playing with their calculator. How does anyone have the time ? In fact, since I left school, I don't even take notes in class anymore. I just sit down, listen, jot down a few keywords, and that's it.

Actually both. Here in Brasil we have a different approach to teaching engineering at university. The courses are five years full time, and the classes are less like lectures. You are expected to solve problems during class in many cases. In the last two years you even need a graphing calculator to do the tests, otherwise good luck finding eigenvalues or inverting a high order system.

I did a Control Engineering exam based on State Space approach and controller design and not even a pocket calculator was allowed. We had to invert and find the eigenvalues/vectors by hand. Granted, none of the matrices were more than 3x3, but what's the point of asking anyone to do a 4x4 matrix ? In fact, calculators are not allowed in most exams here (Germany).
Find all posts by this user
Quote this message in a reply
12-15-2020, 02:46 AM (This post was last modified: 12-15-2020 03:09 AM by victorvbc.)
Post: #24
RE: About the continuous Fourier Transform
(12-15-2020 01:47 AM)medwatt Wrote:  I did a Control Engineering exam based on State Space approach and controller design and not even a pocket calculator was allowed. We had to invert and find the eigenvalues/vectors by hand. Granted, none of the matrices were more than 3x3, but what's the point of asking anyone to do a 4x4 matrix ? In fact, calculators are not allowed in most exams here (Germany).

Some teachers don't allow these calculators here as well, especially because people can put pdfs in the calculators and cheat in the tests, but that's mostly on introductory subjects. In subjects like Calculus, Linear Algebra or Physics we aren't even allowed a pocket calculator either. But since I do a whole course based on controls, we see some advanced subjects in the last years, like system order reduction techniques, robust control, nonlinear control, robust stability analysis, etc. And those might require some computational power to be avaliable in the tests, if it's not just written theory questions. Also we have a specific teacher that likes to put high order systems in the problems just because, so his class essentially requires us to have a powerful calculator. The course has some spare HP 50g's to lend for students that can't afford one.

I should've made it explicit that what I had said doesn't necessarily apply to all engineering courses here, but I'd say we don't have such a strict policy against calculators in general, too.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)