Plot Fading with Jakes Model
I tried this to check out how far I can go with chatGPT. To be honest, I didn't expect to get any working output for this example. As anticipated, it didn't go as smoothly as other examples that I tried but the final outcome is much more impressive than I thought.
I didn't expect to get any working solution for this example since I thought there wouldn't be enough amount of documents and sample code on this topic that chatGPT is trained with. Surprisingly I got working Jakes Model coding with just a few back-and-forth.
I had to go through a lot of additional back-and-forth and manual debugging to get the final result as shown below, but most of the code revsion and debugging was for graphics part. Almost no revision for Jakes algorithm itslef.
this code is created first by chatGPT on Jan 10 2023 (meaning using chatGPT 3.5) and then modified a little bit my me. The initial request that I put into chatGPT is as follows :
NOTE : It is not guaranteed that you would have the same code as I got since chatGPT produce the answers differently depending on the context. And it may produce the different answers everytime you ask even with the exact the same question.
NOTE : If you don't have any of your own idea for the request, copy my request and paste it into the chatGPT and put additional requests based on the output for the previous request. I would suggest to create a new thread in the chatGPT and put my request and then continue to add your own request.
Following is the code for implementing Jakes model and plot for a data before and after fading, but I didn't get this with single request. At first, chatGPT wrote out the code with many parts missing. For example, at first it just wrote out 'function definition fadingAlgorithm(data, delayTabs)' and didn't implement the fading algorithm. So I had to tell 'complete fadingAlgorithm()' and it wrote out the complete code.
On top of it, it printed out the comment '// Plot the data on the canvas before fading' and '// Plot the data on the canvas after fading' and didn't print out real code for it. so I had to tell 'rewrite plotData() with the complete code for the commented part'.
I was so impressed by the fact that I can improve the code with this kind of chat with chatBot as I do with human programmer.