2.91667

2.9 | 14 ratings Rate this file 2 Downloads (last 30 days) File Size: 555 Bytes File ID: #21553

Cornu spiral_Fresnel Integral

by Venkata Rama Krishna

 

24 Sep 2008 (Updated 24 Sep 2008)

Fresnel Integation should be done with numarical methods

| Watch this File

File Information
Description

Fresnel sine and cosine integrals should be done with quadl matlab function.

MATLAB release MATLAB 7.6 (R2008a)
Other requirements MATLAB 2008a
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (16)
25 Sep 2008 marcelo marini

Please delete this submission

25 Sep 2008 Prasad MS

This useful for diffraction analysis with physical optics

25 Sep 2008 parameswa Rao devineni"

Useful for edge diffraction analysis

25 Sep 2008 B. Roossien

You would wonder why some think this is useful, while others believe it should be deleted.

This submission is a script file that clears your workspace and it also doesn't contain any usefull comments. I'm with Marcelo on this one. This submission is useful to nobody. Please delete

25 Sep 2008 Jos x@y.z

BEWARE! This malware script clears your workspace. The complete lack of help and comments make this submission useless for others than the author. Please delete.

25 Sep 2008 John D'Errico

One problem with scripts like this is they teach others that it is a good way to program. It is not.

Scripts that clear your workspace mean that whatever you were just working on has disappeared. Instead, the author should learn to use functions. They have their own workspace, and so the problem (and the need to clear everything) disappears.

Next, your submission should be useful to others. To satisfy this, it MUST have help. It must explain what it is doing.

Learn to write code that is well documented, that uses functions, that has error checking, that is user friendly. As it is, this code is none of that. It is useless to anyone beyond the author, and worse teaches others bad programming habits. It is poor. The only person who might think it useful is someone else who has as terrible a programming style and habits as this author.

26 Sep 2008 stalling AK

Excellent code for optics

27 Sep 2008 siva ganga prasad

It is much more useful in the field of general antennas especially to analyse edge diffraction
    This code will give a flexibility to determine fresnel integration

27 Sep 2008 Jos x@y.z

The two 5-star reviewers should be aware that they give the author the false impression that his code is actually good, whereas it is not. But hopefully the author will be able to improve his programming skills by ignoring these fake 5-star ratings. Learn how to use functions, how to include help and comments, and many will be thankful.

01 Oct 2008 Integ Rati

Wonderful! This is great! Thanks for the effort. Fresnel integration - along with other similar methods - should be included in their own toolbox, by Mathworks. (that's how useful they are). Again, nice job!

Some people have complained about the clearing of the workspace. YOU SHOULD NEVER RUN A SCRIPT YOU ARE NOT FAMILIAR WITH! If you run this and you lose something in your workspace: You got what you deserved. It MIGHT be more ELEGANT to write a function to preserve the workspace, but it is NOT required. Some of the most useful work is done with simple scripts. Also, not everyone has the time to waste on writing code as if it were to be submitted to a high school computer programming teacher. Rather, the purpose of programming is to solve problems, not programming for programming's sake.

02 Oct 2008 marcelo marini

Matlab Central already included a vast collection of rubbish codes. Now, it's also the place for trolls. :-(

02 Oct 2008 John D'Errico

I'm sorry, but this is poorly done.

A quick search on the file exchange produces several codes for exactly the same Fresnel integrals that are far more trustworthy. I'd recommend the following implementation as the best by far:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=913&objectType=file

That alternative code is well coded, well documented, uses a series solution for small values of x, etc.

On the other hand, the current submission is poorly done, has no useful help, and uses quadl to solve the problem for all arguments (a terrible way to do it.) This submission is poor in every aspect of the word. And, yes, starting a matlab script with

clc;
clear all;

is the most obvious mark of a complete matlab novice who has no idea of how to provide a useful tool that others will want to use.

06 Oct 2008 Sree K

Good

07 Oct 2008 mar maduke

Useless and poor. If you want something good that does this, look in other places on the file exchange.

14 Oct 2008 KK sarat

Principles of Optics, MaxBorn & Emil Wolf,7th edition, Cambridge University Press

02 Jun 2011 Venkata

good source code

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
cornu spiral Venkata Rama Krishna 22 Oct 2008 10:21:08
fresnel integral Venkata Rama Krishna 22 Oct 2008 10:21:08
communications Venkata Rama Krishna 22 Oct 2008 10:21:08
general Venkata Rama Krishna 22 Oct 2008 10:21:08

Contact us at files@mathworks.com