| Date | File | Comment by | Comment | Rating |
|---|---|---|---|---|
| 02 Nov 2009 | Learn Basic Plotting Principles Powerpoint Slides on the fundamentals of plotting and using the function line() with animation. | Rowland, Darren | Now improved with accompanying source files, this contribution will be a great reference for users who are beginning to experiment with basic animated plots or guis.
|
|
| 31 Oct 2009 | Learn Basic Plotting Principles Powerpoint Slides on the fundamentals of plotting and using the function line() with animation. | Deshpande, Ashwini | Good One .! |
|
| 22 Oct 2009 | Learn Basic Plotting Principles Powerpoint Slides on the fundamentals of plotting and using the function line() with animation. | Aldahiyat, Husam | Hi Darren,
Thank you for your suggestion; I will include the example m files in the next update. |
|
| 21 Oct 2009 | Miller Indices of Cubic Crystals Simple GUI that displays properties of Miller Indices for cubic crystals. | Ralf | Nice visualization. By the way: do you now about MTEX, http://mtex.googlecode.com ? I think this would be a nice feature to include. If you are interested in participating write me. |
|
| 20 Oct 2009 | Learn Basic Plotting Principles Powerpoint Slides on the fundamentals of plotting and using the function line() with animation. | Rowland, Darren | I think that this submission is just slightly lacking. The slides are reasonably informative, but while I was reading them I couldn't help but think that it would be good for a new Matlab user to be able to try out the examples. Unfortunately the corresponding files are not included. I hope Husam can include the files to help beginners get started straight away.
|
|
| 16 Oct 2009 | Tetris for Dummies Tetris with easy code layout and extensive comments. | Diego | ||
| 02 Jul 2009 | Solution to Project Euler Problem 54 How many hands did player one win in the game of poker? | D'Errico, John | I see some changes have been made. These extra comments really help the person reading the code. My thanks there. Personally, I'd still hope that beginning PE solvers try the problem first, before looking at this. Only afterwards should you read through this submission to compare this code to yours. But this is a reasonable approach to the problem. I'll still abstain on an actual rating, but if I were to give this a numeric rating, my rating would be a decent one. |
|
| 02 Jul 2009 | Solution to Project Euler Problem 54 How many hands did player one win in the game of poker? | D'Errico, John | Ok. I'll admit that part of me wishes that Husam did not post this submission, but only a small part of me thinks that way. Why? Because I am a great admirer of the Project Euler problems. They afford a great sense of satisfaction in the solving, knowing that you have used your skills in MATLAB to solve these problems. Most problems require some insight, some understanding of a mathematical concept, as well as not insignificant programming skill to solve in your chosen language. As such they are a tremendous vehicle to help you to learn to use a tool like MATLAB. I have always maintained that the best way to learn a language is to have a project that requires solving. So I hope that most Euler solvers will choose to solve the problems on their own, first, only then look to the occasional published solutions they will find on the net. On the other hand, this is one of the moderately easy PE problems. if this particular solution causes others to find an interest of their own in these same problems, then it is worth having posted it. As I said, my opinion is mixed here. While I am quite happy to see some advertising for others to begin the Project Euler adventure, I hope not to see solutions to each problem appear here on the FEX. As for the code itself, I won't offer a rating because of those mixed feelings. I do very much like that the code is written in a modular fashion. There are useful comments in the main block of code - a good start there, although the comments get sparser towards the end. The individual modules are entirely without comments though, and this is a place where those comments would have been most valuable. How for example, did the author choose to test if a hand is a flush? 3 of a kind? A tutorial code should explain itself. Is there anything else that I might have hoped to see? Yes. Very often solving a problem like this requires the programmer to implement an encoding for the data. In this case, is there an efficient way to encode the hands for evaluation of the potential of those hands? I'd have liked to see some exposition on the data structure employed, as I can think of at least two or three ways to store them. Careful advance thought about the data structures employed is often critical to an efficient solution of the problem down the line. Again, my point is to use this tool as a means to teach how to use matlab to solve a problem. Help the person reading your code to understand how you solved the problem. |
|
| 22 Jun 2009 | General Least Squares Regression Multi Dimensional Multivariable Least Squares Regression | Aldahiyat, Husam | You're right, this is due to the new MUPAD engine. On MATLAB versions earlier than the MuPad era the code should work fine. I will try to fix this problem as soon as possible. |
|
| 09 Jun 2009 | Mth Order Piecewise Spline Interpolation A GUI that plots and gives equations for variable order intermediate splines. | Higab, badr | great code |
|
| 09 Jun 2009 | General Least Squares Regression Multi Dimensional Multivariable Least Squares Regression | Kvasnicka, Michal | at STRB2 function is probably infinite while loop problem |
|
| 12 May 2009 | Master GUI with Ease Powerpoint slides on creating a GUI and programming it. | Ralph | usefull, would help to cover guidata |
|
| 29 Apr 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | David | Very well done. |
|
| 29 Apr 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | David | Great program. |
|
| 29 Apr 2009 | Master GUI with Ease Powerpoint slides on creating a GUI and programming it. | Herve | ||
| 24 Mar 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | NOUR | ||
| 24 Mar 2009 | pigeon.m Draw a 3D pigeon. | NOUR | ||
| 14 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | Jveer | decent effort |
|
| 14 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | NOUR | haha, this is a good and a funny one, good job husam, keep on.. |
|
| 14 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | NOUR | ||
| 13 Mar 2009 | General Least Squares Regression Multi Dimensional Multivariable Least Squares Regression | D'Errico, John | This looks like it would be nice, though I do not have the symbolic TB to put it through its paces, so I will not offer a rating. It is an alternative to my own polyfitn, with output directly into a sym form. A couple of comments. (Surely you would not expect me to have nothing to say.) Good help. I like to see verbose help, even when some others have been known to say my help is too verbose. I want all of the questions answered in my help, and this help made an effort. I like the examples. Error checks, and an H1 line. All good. The code itself looks like it was carefully written, but as I said, I could not test it. I had a couple of style points though. I'd rarely recommend the use of variable names like "kkksdgsdg". When you need to debug the code, reading it will be more difficult in a year or so because of a randomly chosen string of characters. I know, sometimes it is difficult to come up with a mnemonic name, but you can try harder than that. Also, use internal comments. This code has virtually none, except for a credit to Roger Stafford. (Well done there. It is always good to give credit where it is due.) Those internal comments make your code readable. they allow a reader to follow your code and your thoughts as you wrote it. Those comments take less time than you think to write, but they are worth their weight in gold when you need to read even your own code next year. Finally, I'm not sure I like this style of error message: error('MSG:ID3','lengths of martices x and y need to be the same') If you will use a message identifier, why not provide a descriptive name instead of MSG:ID3? This reminds me of the old days writing IBM Fortran code, where each programmer learned the meaning of cryptic error messages, identified only by a few characters and a 3 digit number. We then had a manual that offered an even more cryptic explanation of that error code, if you wanted to dig for it. |
|
| 13 Mar 2009 | General Least Squares Regression Multi Dimensional Multivariable Least Squares Regression | Aldahiyat, Husam | If you liked this submission please rate it! :) |
|
| 12 Mar 2009 | Master GUI with Ease Powerpoint slides on creating a GUI and programming it. | Kaczkowski, Peter | ||
| 09 Mar 2009 | Master GUI with Ease Powerpoint slides on creating a GUI and programming it. | Giaccari, Luigi | I like when someone makes things easy, avoiding to complicate the work just to make it seem a good work. |
|
| 06 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | Aldahiyat, Husam | The model on my computer has everything you mentioned plus more (two elevator shafts, tabulated results), but there's no need to submit it here because the working principle is the same. Putting the basic program here would make it easier to learn (less comments and lines of code to read,plus it's basically simpler). If you were joking, then you'd edit the rating, no? ;) |
|
| 05 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | katelouzos, skouliki | i was just joking...;) |
|
| 05 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | Aldahiyat, Husam | It's a simple model that can be built upon. The purpose is pure educational (read: comments). |
|
| 05 Mar 2009 | Graphical Simulation of an Elevator Graphical Simulation of an Elevator and its passengers. | katelouzos, skouliki | how come people in this building are only entering?
|
|
| 02 Mar 2009 | pigeon.m Draw a 3D pigeon. | D'Errico, John | Like the honeybee, I find it difficult to believe this would actually fly. |
|
| 02 Mar 2009 | pigeon.m Draw a 3D pigeon. | Eaton, Kenneth | That must be one of those American pigeons, seeing as how it's so obese! =) Cute function, though. |
|
| 25 Feb 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | D'Errico, John | The appropriate review would just be this. 8-) |
|
| 25 Feb 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | Aldahiyat, Husam | Wow, too easy. Thanks. |
|
| 24 Feb 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | Eaton, Kenneth | One solution to the dependence on the Image Processing Toolbox... you could plot a square surface object, then texture map the smiley-face image onto it. Then you can simply rotate the surface object yourself, without a need for the IPT. |
|
| 24 Feb 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | Aldahiyat, Husam | Ah, sorry about that. Will send an update that brings notice to this. Also, you're to be mentioned as inspiration in the code. Forgot to include that in before. As for getting around the problem, I don't think there's a simple way to do it, so anyone without the Image Processing Toolbox should comment out lines 278 and 282. The result is missing out on the smiley face bit altogether. |
|
| 24 Feb 2009 | Bouncing Smiley Face Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face. | D'Errico, John | Looks very nice. I was disappointed that no mention was made of the requirements for use. NO image processing toolbox, no go. ??? Undefined function or method 'imrotate' for input arguments of type 'uint8'. Error in ==> bb2>go at 282
??? Error while evaluating uicontrol Callback |
|
| 19 Feb 2009 | General Least Squares Regression Multi Dimensional Multivariable Least Squares Regression | Demirel, Mehmet | ||
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Giaccari, Luigi | Now is clearer!! what a long discussion did it cause!!!!! I give this 4 star, one is missing beacuse I thing is a little to simple model. But overall it is nice submission like so many comments testify. In the end I thing this is the MEX purpose, to create discussion and improve each other. Thanks to the Author and all commenters !! |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Eaton, Kenneth | Marco, I'll repeat what Husam told you, because I just tried the code myself. The default values (gravity set to 9.81, the initial vertical velocity set to 0, and the initial horizontal velocity set to 500) cause the ball to fall downward and rightward, bouncing a few times before coming to rest on the ground. If you don't get this result, check your version of MATLAB. I'm running 7.1 and didn't see any animation problems. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Aldahiyat, Husam | The program didn't specify which Universe its physics laws adhered to. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | PXlab | In my vision if your program is a simulation of the reality then there is error, in the formulas there is error, because with 9.81 gravity and zero vertical velocity isn’t possible to stay up. With an immaginary interpretation then program is ok “because a ball with initial Y velocity of 0 and gravity of 9.8 will go down” but in the real life the Universe, like a ball in my hands, stay up, don’t precipitate. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Aldahiyat, Husam | Maybe you have an old version of MATLAB or something, because a ball with initial Y velocity of 0 and gravity of 9.8 will go down. This is the last time I'm reposting this ;) |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | PXlab | The error is in the start=end condition.
|
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | D'Errico, John | Luigi is correct to some extent, that rolling friction does not slow down the ball. Air resistance may be a larger factor, depending upon the velocity. However, the point I was trying to make that a spinning ball will behave differently when it hits the ground than a ball that is not spinning, and that some of the energy of the ball can be converted from one form to another by its interactions with the ground. Also, friction with the ground is very much a factor in those interactions. A rapidly spinning ball with a high amount of rolling resistance will have a very interesting behavior. I'll look forward to seeing a spinning, smiley, bouncy, deformable face. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Aldahiyat, Husam | Marco:
ed2=0 & ed3=100 --> the ball go down and go up over the start horizontal reference
ed2=100 ed3=100 --> the ball go down and go up over the start horizontal reference
Start condition: ed2=0 & ed3=1 --> the ball stay up
Anyway, I thought the whole point of this program was to show off a short code that produces a fun animation of some bouncing around. With that in mind, I'm adding some new features; smiley face colour, simple deformation, and spinning. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Giaccari, Luigi | Yes
Well I don't want to be annoying but I have readen something wrong in previsious comments. Friction of the ground doesn't slow down balls. Friction makes them pivot.
What really stops in real life the ball after a while it pivots it is not the ground friction, it is the ball deformability.
|
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | PXlab | In this software:
|
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | D'Errico, John | Luigi is correct here. There is a problem in the model, but a minor one I think. Friction should be a retarding force, and as friction increases, the ball should slow down. So for friction above 1, the ball could not speed up. "Elasticity" in the model is used as a coefficient of restitution. This is essentially the fraction of the kinetic energy that is conserved in a bounce. So for elasticity greater than 1, we expect the ball to bounce higher each time. This is acceptable in the vertical direction, if you wish to model an uber-rubber ball. I might also be tempted to rename "elasticity" to "restitution", which is arguably a more accurately descriptive name here. If you want to model the horizontal physics in this way, "friction" should slow down the ball at each bounce, for any positive value of friction, and high friction should slow it faster. Were you to allow a negative frictional value, it could then arguably speed up after a bounce. If you make some changes, here are a few other neat ideas. Make the ball squishable, so that when it does bounce, it deforms. The "elasticity" parameter would naturally inversely govern the extent of the deformation. One might also allow the ground to deform too, absorbing some of the energy of the ball at each bounce. Again, a negative term here might increase the energy after a bounce. Introduce a secondary frictional retarding force, perhaps proportional to the square of the velocity in the air. Allow the ball to start out spinning, with some rotational velocity, in either direction. Thus, when the ball hits the ground, the angular momentum in the spinning ball can be transformed into a horizontal component of momentum. The friction with the ground would govern the amount of momentum transferred. This would work in the opposite direction too. If the ball is not spinning to start with, when it hits the ground, that can start it to spin. Add a smiley face to the ball. After a the first bounce, make it look surprised. If the ball is spinning, the smiley face could rotate too, which would be a good way to show the spin rate. A really complete model might even include fluid effects due to the spin. Thus a high rate of spin would help the ball to fly a bit further, or slow it down, depending on the direction of spin. Think of a golf or tennis ball, and how it behaves. One might modulate this with a surface texture parameter, shown as a rough or smooth ball. The viscosity of the medium would then be factor. (Don't you love it when someone comes up with this many features to add to your code? Hey, I'm not the one who would do the work.) Regardless, I do like the help. It seems rare to find help in a gui tool, and even more rare that the help is good and well written, so I was very pleasantly surprised here. I'd rate this as less than 5 only because the friction is clearly incorrect physical behavior. But I'd change my rating to a 5 as soon as that is repaired. And, I'm not willing to decrease my rating below 4.50000001 anyway, so I'll just round it up to a 5. I'll still root for some of those other terms I've described to be added to the model though. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Aldahiyat, Husam | Thanks for the comments.
Friction -> Horizontal Speed Conservation
I believe this was the problem since in reality increasing friction would make the ball travel a shorter distance while in the GUI it was the opposite case. It was made this way deliberately but the choice of wording was inappropiate. Please check the updated version to see if your questions were met. |
|
| 11 Feb 2009 | Bouncing Ball Physics Fun Graphical User Interface that simulates the simplified physics of a ball bouncing off the ground | Giaccari, Luigi | Nice GUI but there is something wrong in the mathematical model. This not a bouncing ball, in the simplest model, the friction value, I think you mean the friction with the ground, should affect the way ball pivots not length after that the ball stops. For zero friction the ball just stops why?
-With intermediate values should slides and pivots dependending on materials data. -With high friction should pivots without sliding. If you try to insert a friction value >1 the ball accelerates, and this isn't phisical. I saw you study mecatronics, you can realize that with Working Model software, or simpler throwing a ball. I thing it need to be fixed |
|
| 10 Feb 2009 | Animate a Simple Mechanism How to plot and animate a simple slider crank mechanism. | Barragan Guerrero, Diego Orlando | Nice |
|
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com