Talk:MATLAB
From Wikipedia, the free encyclopedia
[edit] Alternatives
[edit] Release date history
It would be nice if there was a history of different releases - i.e. the date of various major releaes. I find it confusing to know of Matlab 6.5, Rlelease 13 (I've no idea if release 13 is before or after 6.5), then 2007a. —Preceding unsigned comment added by 213.78.42.15 (talk) 13:08, 19 November 2007 (UTC)
- I second this argument, I came to wikipedia page exactly to find that info and I (obviously) wasn't able to. --85.18.14.13 (talk) 17:00, 7 January 2008 (UTC) A.E.
[edit] DADiSP
I have used both DADiSP and MATLAB and for numerical work and find DADiSP far more useful for signal processing whereas MATLAB is more complete for matrix manipulation and linear algebra. Now, that's an opinion or "advertisement." Adding text about DADiSP in the COMPETITION section of the MATLAB page is completely factual- no opinions or anything remotely similar to an advertisement is expressed. In fact, the Mathematica text seems serve much more as an opinion or advertisement. In any case, it seems the people who work for the MathWorks and edit this page would prefer not to mention any MATLAB competitors.
- Fair enough. I know nothing about DADiSP, other than what I've learnt from a glance at their website, but it seemed to me that the program is mainly for the analysis of data series and therefore occupies a slightly different niche (I concede that the same point can be made about Mathematica). I want this article to be primarily about MATLAB itself, and not its competitors, but I may indeed have been too fast in reverting your contribution. To my defense, I can say that somebody removed the reference before and that it was re-added without edit summary. --Jitse Niesen 15:57, 22 Jun 2005 (UTC)
-
- The competitive products mentioned in the article, like Mathematica and Mathcad, have user bases at least within an order of magnitude or two of MATLAB. DADiSP is one of literally dozens of niche competitors to MATLAB. I've been an employee of the MathWorks working on MATLAB for eight years and have never heard of it before. DADiSP is listed on the linked-to "numerical analysis#Software" page, so I feel like it's covered. Anonymous, please give more information about why you'd like to see it also listed on the MATLAB page. Also, because of my conflict of interest, I'd appreciate feedback from experienced editors on this issue. The section on competitive software grows like topsy and would quickly dominate the article if unchecked. I imagine information about Linux on the Microsoft Windows page (and vice versa) also needs periodic grooming. --Matthew Simoneau 06:54, 21 July 2005 (UTC)
-
-
- The idea here is to spread factual and related information on a given topic. I am well versed in DADiSP and MATLAB as well as other tools in the technical computing space. As mentioned, DADiSP and MATLAB possess many similarities and some significant differences. The fact remains that almost anyone interested in MATLAB would also be interested in DADiSP and a handful of other tools - this page should reflect that interest. Of course, I fully understand that the purpose of this entry is to discuss MATLAB, but not exclusively. Otherwise the page devolves into a corporate dominated advertisement. In fact, one could assume the majority of readers finding this page are not familiar with MATLAB and therefore would be very interested in alternate technologies. Hence, a more prominent listing of alternatives is merited. In any case, DADiSP is hardly unknown and this information should not be censored simply because of Mr. Simoneau's ignorance of the product. I have the feeling that if Mr. Simoneau was employed by Microsoft and not The MathWorks, he would attempt to justify censoring Mozilla browsers and others on the Internet Explorer page with some sort of market share argument. Having a company employee add factual information is fine, even desirable if it is accurate and objective. However, having employees remove related and alternative information smacks of covert advertising. Adding a few lines about useful, related technologies increases the knowledge and awareness of readers without detracting from the primary purpose of the page. --Ed Miller
-
-
-
-
- I was brought to this page by a post at the Village pump asking for wider views. In my opinion, the entire section on "Competition" should be removed from this article, and anything within it not already in the Numerical analysis "Software" section merged there. This is an article on one software program, which is undoubtedly one of the leaders in its field, and other programs need to be discussed and compared in the article on the genre, not here.
- I have used MATLAB and also Rlab. I started the Wikipedia article on the latter. I added a link to the Rlab article to this article at that time, a long time ago by Wikipedia standards. I am now saying that link was not appropriate, or at least, that it is no longer appropriate.
- As a similar situation where I have a vested interest, I wrote the article on Ghost, and also the generic article on Disk cloning. It would not be appropriate for other vendors to add reference to their competing software to the Ghost article, but very appropriate for them to do so in the Disk cloning article. I'm rather disappointed that few have done so. I have seen a question about competing software on the Talk:Ghost (software) page, and have tried to answer it honestly. --gadfium 09:16, 18 August 2005 (UTC)
-
-
-
-
-
- As another outside view, after reading over the page, and this talk page, I agree with gadfium; the Competition section should go. I'm going to be bold and merge it into numerical analysis - if I have missed anything, feel free to add it; if there is disagreement, feel free to revert... --JesseW 04:30, 25 August 2005 (UTC)
-
-
I disagree strongly with the original post. I really cannot see any reason to remove the references to Octave, even in the See Also. MATLAB is a language of numerical analysis and scientific computing, and that although in other applications there are indeed niche products related to Matlab, octave is, by virtue of being both Free and almost as old as Matlab the best known in that community. I do not agree that we should have an ad-fest of Mathworks want-a-bes adding their own minority product, but not making any reference to octave for that reason severly detracts from the article. Billlion 19:47, 16 February 2007 (UTC)
[edit] Octave
I added a comment to a section above on something called DADisP as the comment in the articles points to that. Look I work in Mathematics and Scientific computing, and in this sphere there is Matlab and Octave depending on the depth of your pocket. We need to have a proper debate about what this article says about Octave without having a revert war. Billlion 19:52, 16 February 2007 (UTC)
- I think it's disingenuous to completely fail to a program by a well-known project (GNU) that is even attempting to create an alternative implementation. It should be described fairly, not shoved under the carpet. Superm401 - Talk 10:48, 17 February 2007 (UTC)
- I don't think that it matters how well known the GNU project is. The important thing is how well known Octave is. In my kind of environment (academia + numerical analysis), Octave is very well known and no other MATLAB alternative comes close to it, and I thus support having Octave in the article. However, it is well possible that in other circles (perhaps data analysis) other alternatives (perhaps DADisP) are more well known. To make matters worse, this is the kind of thing that it is hard to find sources for.
- By the way, I reverted the edit mentioning Octave partially because I thought there was a consensus not to, but mostly because I didn't like the added text because it seems to promote some connection between the availability of Octave and vendor lock-in, but it was not clear to me what this connection actually is. -- Jitse Niesen (talk) 13:57, 17 February 2007 (UTC)
-
- I agree completely with the sentiment that it's disingenuous to not mention Octave and other similar software by name. Their absence feels like some kind of conspiracy of silence! The entry for Octave mentions Matlab prominently in describing what Octave is. The Matlab page should at least have a cross-reference to Octave. Tobin Fricke 25 May 2007
- I could not recollect the name of Octave. I came to this page in the hope that the name Octave will be mentioned. But Alas! not. I think it is a good idea to have a section 'Related Software', containing atleast links to alternatives. It would have saved me time from searching further. 64.119.43.102 07:27, 28 June 2007 (UTC)
- Octave falls far short of having all of the capabilities of MATLAB. It is probably worth mentioning that deep pockets aren't the only reason for deciding whether or not to use MATLAB. Some things simply CANNOT be done (as of today) using Octave. —Preceding unsigned comment added by 71.198.153.240 (talk) 06:45, 28 November 2007 (UTC)
I guess there will always be someone to criticize the fact that Matlab is commercial and to mention the single alternative she cares about, Octave, because it's free software which is good. Highly biased opinion, but I'll refrain from undoing that now. Engelec (talk) 16:45, 15 April 2008 (UTC)
[edit] Octave a "near-clone"
The fact that Octave is a "near-clone" of Matlab is probably notable, but certainly highly subjective. Programs such as Sysquake or O-Matrix have also have a good Matlab compatibility among their goals. Sysquake has user-defined objects (such as lti and friends in the Control Toolbox) while Octave doesn't, for instance. --Steveaa 09:11, 1 September 2006 (UTC)
[edit] Lists
I stumbled on this page in the Manual of Style: Wikipedia:Embedded list. It suggests to me that we shouldn't have a section which is just a list of MATLAB alternatives, especially since there is already a page, List of numerical analysis software, which the article already links to. I removed the list and added a comment near the link that some of these other programs are free and compatible with MATLAB. Matthew Simoneau 14:40, 20 February 2007 (UTC)
[edit] Freemat
Perhaps, just perhaps, include Freemat in the alternatives section? It's open-source. Danuthaiduc (talk) 17:09, 21 November 2007 (UTC)
- There is no alternative section, and I think it's a good thing, since it's bound to be uncomplete. Freemat is listed in List of numerical analysis software which shouldn't be replicated here. Engelec (talk) 14:47, 23 November 2007 (UTC)
[edit] MATLAB more convenient for numerical computing
I think that MATLAB is objectively more convenient for numerical computing than Mathematica, simply because it is made for numerical work. For instance, in MATLAB you can type "exp(-1)" and get 0.367879..., while in Mathematica it remains unevaluated. Of course, it is also possible to get a numerical approximation in Mathematica, but you need to specify that while MATLAB defaults to numerical operations. Similarly, Mathematica is superior in symbolic manipulation, which cannot be done at all in the standard version of MATLAB. --Jitse Niesen 10:53, 1 May 2005 (UTC)
- I agree that MATLAB is superior for numerical computing, and that's why I use it and not Mathematica. But that's irrelevant. Who are you or I to judge which is easier? Why should we use an encyclopedia to endorse personal beliefs? --✈ James C. 16:54, 2005 May 1 (UTC)
-
- What I am trying to say is that the superiority of MATLAB is not just a personal belief, it is what everybody (or at least almost everybody) in the field of numerical computing thinks and that is why we should mention it. --Jitse Niesen 22:22, 1 May 2005 (UTC)
-
-
- I agree that everyone thinks MATLAB's better for numerical computing. I believe though that regardless of a belief's popularity, that an encyclopedia should contain only facts. This need not be reduce the helpfulness of articles, as many opinions can be factualized. For example, to support your belief that MATLAB better handles numerical computing, you stated some factual examples. With some mild restatement for style reasons, those examples can be added to the article and factually express the appropriateness of MATLAB for numerical computing. Facts need not be generalized as opinions. By sticking to pure facts, we maintain clarity and eliminate vague opinions. --✈ James C. 23:26, 2005 May 1 (UTC)
-
-
-
-
- I agree that an encyclopedia should contain only facts, but I think that "MATLAB is more convenient than Mathematica" is a fact. I admit that the term convenient is rather vague, but it is possible to give a definition of convenient, and while we can argue for a long time about the details of the definition, MATLAB will be more convenient under all definitions. Of course, the examples are also facts. However, it is not that interesting that you use "exp(-1)" in MATLAB and something like "N[Exp[-1]]" in Mathematica. If we want to express the appropriateness of MATLAB for numerical computing, we should state it and not hide behind unimportant but easily verified examples. --Jitse Niesen 22:17, 2 May 2005 (UTC)
- It seems to me that "convenience" is a matter of opinion no matter the context. In the case of Matlab and Mathematica, they both target marginally different markets and their syntax and capabilities reflect that. Personally, I prefer matlab, but an article entitled "MATLAB" hardly seems the place to start talking about the pros and cons of matlab and mathematica, a Comparison of Numerical Analysis Software page would be far more appropriate imo. --Quadbox 15:21, 22 March 2007 (UTC)
- For the record entering Exp[-1.] gives the same result as Matlab with only one character difference.JonMcLoone 11:35, 8 June 2007 (UTC)
- I agree that an encyclopedia should contain only facts, but I think that "MATLAB is more convenient than Mathematica" is a fact. I admit that the term convenient is rather vague, but it is possible to give a definition of convenient, and while we can argue for a long time about the details of the definition, MATLAB will be more convenient under all definitions. Of course, the examples are also facts. However, it is not that interesting that you use "exp(-1)" in MATLAB and something like "N[Exp[-1]]" in Mathematica. If we want to express the appropriateness of MATLAB for numerical computing, we should state it and not hide behind unimportant but easily verified examples. --Jitse Niesen 22:17, 2 May 2005 (UTC)
-
-
[edit] Criticism (sample rate)
I have some problems with the following fragment:
- "The matrix data type is devoid of important attributes required by real world data such as engineering units, sampling rates and time/date markers. These attributes must be managed by the user with custom programming.
- The lack of sample rate information is a serious flaw for signal processing applications, where data is typically sampled at a constant interval. To produce properly scaled results, MATLAB programs require or must generate both the amplitude values and the explicit time values. Because twice the volume of data is necessary, computation is further slowed for large matrices."
The complaint in the first paragraph seems to be that the matrix data type is a matrix data type and does not have any other attributes. That is not a valid criticism.
The second paragraph claims that twice as much memory is needed, but I doubt very much that that is true. I'm not sure what applications the writer had in mind, but anything I can think of can easily be done with just the amplitude values and the sample rate. --Jitse Niesen (talk) 14:01, 28 August 2005 (UTC)
- I did not write these criticisms, but I easily could have and I think they are quite valid. I believe the first criticism is about the implications of MATLAB using the matrix as the main data type. Other products (like Mathcad) also use a matrix, but it automatically includes properties such as units. Perhaps that data type is an array and the MATLAB matrix is a subset of the more general purpose array type. Properly converting units is a tedious but important step in data analysis, a detail that the computer should perform automatically. MATLAB forces the user to write this code. It is rumored that the Mars lander that crashed due to improper English/Metric unit conversion used software written in MATLAB.
- The point about sample intervals is something I have experienced many times. For example, to produce a simple plot of data with a constant sample interval, I have to provide MATLAB with the x data in the PLOT function to get the correct axes values. This can lead to very slow performance when plotting large data files (twice the volume of data is used). Again, with other products, the sample interval is a property of the data and the plotting is much faster and far less error prone. Serious problems also occur when calculating Fourier transforms, data interpolation, decimation, extraction, curve fitting, filtering and just about any operation on data where the sample interval is not unity or multiple data sets have different intervals. I have to "manually" carry all this time data throughout my computations, slowing things down due to data bloat. My colleagues routinely complain about the lack of automatic sample interval support in MATLAB. All of this is due to the matrix data type with no properties. You can attempt to code around it, but then you are dealing with details the language should handle and you find yourself further removed from the problem at hand. I am not disparaging MATLAB (I use it almost everyday), but these are real criticisms when one applies MATLAB to real data. MATLAB was clearly designed to operate on numbers (matrices), not data (arrays). Perhaps applying MATLAB to real data is a misuse of MATLAB.--EdMiller
-
- Sorry for not commenting earlier but the criticisms section was merged from a page from AfD called "MATLAB problems" (I did the merging) - anyway I want to say that you guys did a great job and should be commended :) --Ryan Norton T | @ | C 07:50, 8 September 2005 (UTC)
-
-
- EdMiller's comment convinced me that there are some valid criticisms in the section I quoted, though perhaps badly worded, and I rewrote the section in response. The main point, as I see it, and with which I agree, is that "MATLAB was clearly designed to operate on numbers (matrices), not data (arrays)". This should perhaps be emphasized more in the article.
- Indeed, for PLOT twice the volume of data is used, but I am not convinced that that's the reason why plotting large data files is so slow. For Fourier transforms, data interpolation &c, you indeed have to program around it, which is a bad thing (it takes time to program around it, and the extra code may contain errors). However, again I doubt that it slows the program down; after all, even if the data type supported a sample rate, the necessary rescalings should be done (only not by the code supplied by the user but by the program itself). --Jitse Niesen (talk) 13:01, 8 September 2005 (UTC)
-
-
-
-
- I personally dislike this criticism, too. Essentially, this criticism says to me "MATLAB is a general purpose program and it's not a more specialized program." There are things like the Signal Processing Toolbox (I've not used it, so I can't say much about it) that may partially address these concerns. This criticism says that MATLAB is not exactly what I need for my specific purpose, but in my opinion, it wasn't designed to be that. I think that the text should be removed. --Wsloand 16:14, 13 November 2005 (UTC)
-
-
-
-
-
- Sorry for the double update. Essentially, I think that this criticism is a general criticism of most languages (i.e. the same could be said about C, FORTRAN, Perl, python, etc.) so it is not a good criticism for this language. Also, the part about writing your own code being error prone, that implies that the people who write code at Mathworks never get anything wrong (I personally found a bug just last week in part of the figure manipulation routines). --Wsloand 16:29, 13 November 2005 (UTC)
-
-
-
-
-
-
- Ditto. - DNewhall
-
-
-
[edit] Criticism (procedural)
I also dislike the criticism that starts "MATLAB is a procedural programming language, so it cannot automatically update variables in response to input changes as one might want for simulations or exploratory data analysis" because it is a general criticism for a procedural programming language. This criticism (like the one above) is just that the language operates the way it was designed. --Wsloand 16:29, 13 November 2005 (UTC)
- Yeah, the way it was poorly designed. They tried to fix the total lack of OOP by adding java "objects" but this is complete crap, let me tell you. If I sound bitter it's becasue I spend several hours a day programming matlab. Dsol 02:55, 4 December 2005 (UTC)
- I agree, the criticism is warranted. The lack of having variables that automatically update a dependency chain is a serious omission for a technical computing data analysis language. Mathcad, Mathematica and even Excel include this basic feature. DADiSP has a procedural language component called SPL (Series Processing Language) that includes what they call "hot variables," variables that automatically update like spreadsheet cells. The starting thread here is similar to saying criticizing the fact that Model T Fords only came in one color is inappropriate since they were designed to only come in black. EdMiller
- While it might be valid criticism that part should be removed or seriously reworded since as Ed Miller just showed you can have a procedural language with automatically updating variables. Also, it's possible that someone could make the argument that being a strict procedural language is one of its strengths since you could retrain your Fortran programmers quicker and cheaper then switching to Mathematica or something. I think it should say that Matlab lacks automatically updating variables which is a feature of many other numerical processing products that some researchers/workers have come to rely on. I spend most of my work day programming acoustic data analysis programs and have never found this to be a problem so I wonder how prevalent this criticism is. - DNewhall
- From my point of view, a criticism section is entirely warranted. As an engineering student forced to learn how to use Matlab (which I find entirely useless), I can very much appreciate criticism of any kind concerning the program :)
[edit] Is a "Criticism" section appropriate?
I'm a new Wiki* contributor but have used it for a while. Also, my name is Dave and I'm a Matlab-olic (hi Dave!). It struck me as odd that an article about a piece of software has a criticism section. For comparison, there's no such section in the Microsoft Word or Octave articles. I could easily add a criticism section to Octave ("It sucks compared to Matlab") but this is totally inappropriate, in my opinion. People's opinions about matlab syntax or features doesn't seem to be basic information about what Matlab is.
Having said this, I personally think some of the critiques are valid. "Vendor lock-in" has become an especially poignant issue in my life after leaving grad school. But the point is, should there be a section discussing these things here?
Is the controversy over Matlab an important part of what Matlab is? Some wikipedia topics, like nuclear energy, discuss the controversy around that issue. I would say this is legit since I, and most intelligent I speak to, consider there to be real controversy in the public about nuclear energy. As empirical evidence I point to the fact that the page has been flagged NPOV for most of this year :) I remember seeing a wiki topic "X controversy" about some topic X before, but can't find an example now.
Either way, in my judgement there are no controversies about Matlab that are "inherent" to Matlab, any more than there are always disagreements within any software user community about what product is best. Besides, why have a criticism section without an 'advantages' section, which would have to acknowledge Matlab's overwhelming market dominance.
One last thought - among physicists the commercial products used for numerics most commonly used are Matlab and IDL (I don't use the latter). If people are mentioning competitors like DaDiSP, perhaps IDL should be listed.
Thoughts? --Dstrozzi 00:38, 5 December 2005 (UTC)
- A "Criticism" section on just about any Wiki topic seems fairly standard. Java, C, IDL, they all have them. The criticisms about MATLAB are inherent to MATLAB in that MATLAB, like any product, entails certain design decisions that result in systemic problems - problems that lead to criticisms by the MATLAB community. Also, market dominance often has much more to do with marketing ability and promotion than technical superiority. -- EdMiller
- A Criticism based on vendor-lockin is dogmatic, and not appropriate. It is plainly obvious that using a specific product ties you to the environment and infrastructure supporting that product, be it Matlab, MS Windows, or a Toyota Corolla. I buy a specific kind of pen, therefore I buy specific kinds of replacement ink cartridges. As for other criticism, it seems a place for people to vent. I'm not sure that everyone has worked out their own solutions to roadblocks they encounter. —The preceding unsigned comment was added by 71.132.140.250 (talk • contribs) 18:29, 14 October 2006 (UTC)
-
- I think you are missing the point about vendor lock-in. Unlike C/C++, FORTRAN, ADA, Pascal and many other programming languages, the MATLAB language is completely proprietary and controlled by a single company. There is no independent, public organization to supervise language definition or features – i.e. no ANSI MATLAB - nor is there likely to be one in the future. The design, features and compatibility of the language are at the utter whim of the Mathworks. Unlike standardized languages such as C/C++ where a large number of vendors offer competing implementations, MATLAB is only available from the Mathworks, resulting in vendor lock-in. As mentioned, this is certainly not the case with other programming languages. -- EdMiller
-
-
- I fully agree that this vendor lock-in criticism doesn't make sense. The MATLAB language itself isn't proprietary, only the implementation and the trademark are. It's easy to develop code that is compatible with both MATLAB and Octave, or both MATLAB and Sysquake, and it's feasible to develop other implementations. If one considers lock-in with respect to proprietary implementations, then an equivalent criticism should be made for free software, which has "free lock-in". But the mention of the kind of license is sufficient. Engelec 23:07, 22 October 2006 (UTC)
-
-
-
-
- Really - is there an ANSI standard MATLAB? If I develop code using the MathWorks implementation, which features are part of the standard language and which are vendor specific? Is it the case that the open source GNU Octave version is considered the language standard and the MathWorks version is simply a commercial, proprietary derivative? Also, if my source relies on vendor specific features of the MathWorks proprietary derivative, would I not be subject to vendor lock-in? EdMiller 18:38, 13 November 2006 (UTC)
-
-
-
-
-
-
- No, there is no such standard. It's proprietary. Octave tries to be nearly compatible. That's about all there is to it. Vendor lock-in is in fact a real issue for many matlab users like me, since Octave is not fully compatible. Dicklyon 18:45, 13 November 2006 (UTC)
-
-
-
-
-
-
-
-
- What seems to be the closest thing to a standard is the Numerical Mathematics Consortium (NMC), which seems to target Matlab 4. It's therefore way behind Matlab 7.3 and even Octave and Sysquake. Its members include INRIA (Scilab), Maplesoft (Matlab symbolic toolbox) and National Instruments (LabView), so it will be intersting to see if it can have an effect on the current situation. None of these companies has a direct contender with Matlab 7.3, btw. Engelec 22:33, 13 November 2006 (UTC)
-
-
-
-
[edit] Syntax Section
The syntax section is laughable; I feel it should either be renamed (e.g., "Code snippets"), or, preferrably, expanded to at least include a general over view of the basic syntax, e.g., array construction, array accessing, function definition.
[edit] doesn't make sense
I found the following in the criticism section:
"MATLAB was originally implemented in FORTRAN and later re-written in C. The language shows this mixed heritage with a sometimes erratic syntax: neither C nor FORTRAN, but a combination of both."
This doesn't make any sense. The language used to implement MATLAB has nothing to do with the syntax of MATLAB itself.
- There is a relationship... because what people used to write it in is also likely to influence they way they design the syntax of the language as well. Because the designers were "C thinkers" and/or "FORTRAN thinkers", that is they way they viewed and thought about code. Now this influence is not always apparent or even existing in the new language which is created, but this is what the writer of that section is trying to imply. And in the case of MATLAB, this is a quite reasonable conclusion to reach. Mathmo Talk 20:53, 11 September 2007 (UTC)
-
- While I agree to some extent with the expression "erratic syntax", I don't see how it would come from a "mixed heritage" from Fortran and C. And since it's highly subjective, personal research, etc., it doesn't belong to WP. Engelec 09:47, 12 September 2007 (UTC)
One thing that's being overlooked in this discussion, indeed much of the criticism section, is Wikipedia's policy of "no original research". These issues aren't supposed to be debated here. A statement only belongs on the page if can be backed up by a reputable source. --User:Matthewsim 15:25, 13 September 2007 (UTC)
[edit] Criticism (references)
- MATLAB doesn't support references, which makes it very difficult to implement data structures which contain indirections, such as open hash tables, linked lists, trees, and various other common computer science data structures.
In actual fact there is MATLAB Pointers Library which implements pointers/references in MATLAB. It is used in Data Structures and Algorithms toolbox. --Zolotykh 10:54, 9 August 2006 (UTC)
In addition, the judicious (albeit inconvenient) use of 'assignin' allows one to implement these data structures mentioned (as we have been doing for several semesters at Georgia Tech's introductory computing course). Additionally, Matlab 7 supports OOP within Matlab. --Viggyjiggy 21:30, 06 November 2006 (UTC)
- Actually, OOP was added in Matlab 5, 9 or 10 years ago. Engelec 22:27, 6 November 2006 (UTC)
Now (version 7.6) MATLAB supports references (natively) See [1] --Zolotykh —Preceding unsigned comment added by 85.143.0.30 (talk) 15:19, 4 April 2008 (UTC)
[edit] Multiprocessor support
According to http://www.cs.cornell.edu/Info/People/lnt/multimatlab.html, a major weakness of MATLAB is that it does not support multiple processors. Is this still true?
Ssc1997 00:25, 25 October 2006 (UTC)
- There is a distributed computing engine. I never used it, but I assume that would do the job. The standard version does not support multiple processors, as far as I know. -- Jitse Niesen (talk) 01:08, 25 October 2006 (UTC)
[edit] Dubious criticisms
Some of the criticisms are not valid. The one about data sampling has been commented on several times above. Some of the others seem to be written by computer scientists and C programmers who have fixed ideas about how computer programs should work. For example, the idea that arrays should start from 0 - the whole point of matlab is that you hardly ever need to use array indices (and if you do it slow things down a lot). You just write for example x=[0:100]*pi/100;y=sin(x);plot(x,y); Ironically, if you really want zero subscripts you can easily do this with a function that adds 1, making use of another of the 'criticisms'! There are other possible criticisms - one thing that bugs me is that i and j both default to root(-1). Paul Matthews 17:12, 31 October 2006 (UTC)
- I agree. Imaginary numbers should be written with i or j suffix (e.g. 2j instead of 2*j) to avoid possible bugs. Engelec 20:41, 31 October 2006 (UTC)
-
- For example, the idea that arrays should start from 0 - the whole point of matlab is that you hardly ever need to use array indices (and if you do it slow things down a lot). -- that is a statement of ignorance. if you did signal processing for a living you would know that DSPers often need the index of minimum or maximum of something, whether it is lag in autocorrelation or the (normalized) frequency of some spectrum. at one time, the most pervasive MATLAB toolbox was the Signal Processing toolbox (i also believe that was the very first toolbox) and one of the authors, Tom Krause, told TMW that they needed to fix this indexing thing so that after applying the FFT, the DC component could go into bin 0 where it belongs. they (Cleve) ignored him and this ugly index offset of 1 continues to exist to this day. the formula that MATLAB implements for the DFT is not the same as in the textbooks because of this array indexing shortcoming. there is a backward compatible way to fix this, but it has to be done at the executable level by TMW (users cannot do it) and they have consistently declined to do it. in the 1990's, this came up multiple times on the newsgroup comp.dsp with cross-posting to comp.soft-sys.matlab with some exchange with Cleve, and although they did not (and could not) refute the basis of the criticism, continued to deny the reality of the problem. it's a legitimate critique of the package. r b-j 21:55, 31 October 2006 (UTC)
-
-
- well you've made my point, you have fixed ideas about things that are just conventions. I'm with Cleve. In most applications you just work with the whole array and you dont need indices. The first entry in the DFT is the mean component and whether you label that 1 or 0 is arbitrary. You can subtract 1 if you really want to! And if we are to have such a long section of criticisms we should allow some rebuttals of those criticisms. Paul Matthews 14:23, 2 November 2006 (UTC)
-
-
-
-
- dunno how you came to such conclusion. there are good conventions (that are compact and natural) and bad conventions. nonetheless, the criticism is not that MATLAB won't change its convention (that would break all of this existing code), but that it insists on only this one convention which is flawed for a very large consituency of users.
- "You can subtract 1 if you really want to!"
- no, i am forced to subtract 1 from a returned index or to add 1 when i convert frequency to index. it is something that DSP engineers do all of the time with the FFT. consider this code segment:
-
-
N = 65536; f0 = 285/N; % f0 is frequency of sine wave in cycles per sample. t = linspace(0, N-1, N)'; % t is measured in units of samples. x = sin(2*pi*f0*t) .* hanning(N); % generate smooth windowed sinusoid X = fft(x); [maxValue indexOfMaxValue] = max( abs( X(1:N/2) ) ); % don't look at the "negative frequencies" indexOfMaxValue
-
-
-
- assuming you're familiar with the DFT, from the textbook definition of the DFT, what should the index (indexOfMaxValue) of the peak value of the spectrum be? and what comes out, if i don't modify it. in a complicated program it's easy to overlook this because, from the textbook definition (and MATLAB has purported to allow one to type equations virtually identical to how they are written mathematically) the index that is of the peak would be the equal to the number of cycles the sinusoid makes in the FFT array. DSP engineers are dealing with the indices of spectra all the time, and we have to remember to always subtract 1 when converting index to frequency and always add one when converting frequency to index. for a "high-level" language that purports to allow one to model physical and mathematical systems simply and efficiently, this is nearly intolerable. it is a variance from the definition of the DFT in the literature that is hard-coded into the system. a high-level language like MATLAB is supposed to serve us the users, to accomodate us, not the other way around. r b-j 04:30, 3 November 2006 (UTC)
-
-
-
-
-
-
- One shouldn't add one, one should consider (Matlab) indices as values in a domain distinct from times or frequencies. In your example, one can define a frequency vector similar to t and pick the frequency from it:
-
-
-
f = 0:N-1; freqOfMaxValue = f(indexOfMaxValue);
-
-
-
-
- This allows to have arbitrary sampling frequencies, which 0-based indexing wouldn't permit.
- that's an additional level of junk you're saying that people have to write when they are dealing with a mathematical object that has uniformly spaced and discrete indices (so they are naturally integers) to begin with.
- Yes, but explicit junk is sometimes easier to handle than implicit junk. Engelec 23:26, 6 November 2006 (UTC)
- that's an additional level of junk you're saying that people have to write when they are dealing with a mathematical object that has uniformly spaced and discrete indices (so they are naturally integers) to begin with.
- Mixed indexing would be a nightmare to propagate.
- why? mixed array sizes aren't a problem. if you try to do something that doesn't make sense between two arrays (or "matices", whatever semantic you give it) of different sizes or shapes, MATLAB presently spits out an error. you can actively change the upper array limits with reshape(). why not a rebase() that allows for changing the default base of some dimension of the array from 1 to a specified integer? even a negative integer (for modeling symmetrical and non-causal impulse responses, rather than always having to add and subtract half of the length). r b-j 22:47, 6 November 2006 (UTC)
- I can answer to that, but I'm not sure I'll convince you. I guess that the result of
X=fft(rebase(x,n))
would be 0-based for anyx
andn
. Then what's the base ofifft(X)
? 0 or 1, I presume. Can you add it torebase(x,n)
? If yes, then the sum must have the same base of one of the terms; which one? Addition wouldn't be commutative anymore; nasty. Otherwise, a lot of existing code will break when you feed it with n-based arrays. - Expressions like
vec(find(...))
would fail whenvec
isn't 1-based, becausefind
is a simple function which can't guess the base it's supposed to assume. Of course,find
is not required here, but it's very common. The list of such problems is endless. Engelec 23:26, 6 November 2006 (UTC)- find() would have to be modified to check the properties of the MATLAB variable it's working on to return the correct indices. that's not a problem. fft() could not be used as such because its definition has already been corrupted with the offset of 1. a different function (i might call it dft()) would need to be there for MATLAB users that use the conventional indexing and that could even be extended so that the DFT and iDFT would be:
- I can answer to that, but I'm not sure I'll convince you. I guess that the result of
- why? mixed array sizes aren't a problem. if you try to do something that doesn't make sense between two arrays (or "matices", whatever semantic you give it) of different sizes or shapes, MATLAB presently spits out an error. you can actively change the upper array limits with reshape(). why not a rebase() that allows for changing the default base of some dimension of the array from 1 to a specified integer? even a negative integer (for modeling symmetrical and non-causal impulse responses, rather than always having to add and subtract half of the length). r b-j 22:47, 6 November 2006 (UTC)
- This allows to have arbitrary sampling frequencies, which 0-based indexing wouldn't permit.
-
-
-
-
-
-
-
-
- .
-
-
-
-
-
-
-
-
-
-
- where k0 and n0 are any finite integer. being a periodic sequence, the DFT should be robust enough to work on any input with non-"regular" index range and still have meaningful results. we went through all this in the thread. the comp.dspers pretty much agreed that this is the "right way" and the c.s-s.m people kept saying it would not be backward compatible (but not really proving it). r b-j 00:12, 7 November 2006 (UTC)
- Isn't it what you've just admitted by writing that
fft
had "already been corrupted"? :-) Engelec 00:38, 7 November 2006 (UTC)- i didn't say, with this extension or generalization of indexing in MATLAB, that people would choose to use the definition of the DFT that was not compatible with the textbooks. a counterpart with compatible definition would have to be defined and leave the old "one-based" definition for purposes of backward compatibility. r b-j 01:05, 7 November 2006 (UTC)
- Isn't it what you've just admitted by writing that
- where k0 and n0 are any finite integer. being a periodic sequence, the DFT should be robust enough to work on any input with non-"regular" index range and still have meaningful results. we went through all this in the thread. the comp.dspers pretty much agreed that this is the "right way" and the c.s-s.m people kept saying it would not be backward compatible (but not really proving it). r b-j 00:12, 7 November 2006 (UTC)
-
- A lot of code assumes 1-based indexing implicitly. It would probably be possible to introduce mixed indexing without breaking any existing code, but afterwards, there would be a lot of bugs coming from mixing incompatible functions (i.e. calling functions assumed to be aware of arbitrary indexing which are not, or errors in converting existing code). Matlab has already the bad habit to try to be smarter than the user and fail (see my own criticisms); I can understand the decision of Cleve. Engelec 08:49, 3 November 2006 (UTC)
-
-
-
-
Dubious is right! Don't people have better things to do than pick on a computer language? I use Matlab a LOT for the last 15+ years, and there's one thing I'm glad of: consistent indexing conventions. Sometimes the fact that it starts at 1 instead of 0 is a nuisance; just like in c, where sometimes the fact that it starts at 0 instead of 1 is a nuisance. But in both, it's good that it's consistent. Live with it. Dicklyon 06:10, 3 November 2006 (UTC)
-
-
-
-
-
- Dick, this is what different MATLAB manuals and docs say about the language:
- MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. (Getting Started with MATLAB, v. 5)
- from an earlier manual: MATLAB integrates numerical analysis, matrix computation, signal processing, and graphics in an easy-to-use environment where problems and solutions are expressed just as they are written mathematically.
- for a product that purports to do that and then REdefine the DFT to be
- .
- is just dumb. as soon as they found themselves forced to redefine the DFT, is when red flags should have gone up. and they actually did. the co-author of the original Signal Processing Toolbox, told them they needed to change it. the other co-author (can't remember her name) and Cleve were never open to what the problem is.
- Dick, this is what different MATLAB manuals and docs say about the language:
-
-
-
-
(Disclosure: I'm a MathWorks employee.) The historical reason that MATLAB has one-based indexing is that it was designed by a specialist in linear algebra who thought of the base data type as a mathematical matrix, not a computer science array. Typically mathematicians index into an array with (1,1) in the upper left corner. I think it's appropriate to have a sentence or two stating that this convention is different than most other programming languages, and that some mathematical ideas are better expressed with other indexing. I don't think this is the place to debate the pros and cons of this convention, as it isn't MATLAB specific. There is already good discussion on this subject on the linked-to page, Array#Indices_into_arrays. The criticism section tends to grow out of control, as everyone (including me) has some specific thing they find annoying about MATLAB. Thanks for those of you who have helped keep this section under control. I try not to stay mostly out of it, as I'm not a disinterested party! Matthew Simoneau 15:11, 3 November 2006 (UTC)
-
- OK, thanks for all that discussion. Unfortunately there is still a problem with the page. The dubious criticism remains and whenever I add a rebuttal or mitigation it gets deleted immediately by an editor who wont accept any view but his own, contradicting the NPOV policy. The page should at least reflect that it is debatable. I am not a Mathworks employee, I use Matlab FFT all the time, and the 1 indexing is no problem. Paul Matthews 18:33, 6 November 2006 (UTC)
-
-
- The indexing convention seems better described as a "drawback" than a "criticism". Baccyak4H 18:38, 6 November 2006 (UTC)
-
-
-
-
-
-
- just for your information guys, this has been hashed through a bit on comp.soft-sys.matlab with cross-posting to comp.dsp. the links that i can find in Google Groups are
-
-
-
-
-
-
-
-
-
- [2]
- [3]
- in the latter thread, Cleve said:
- I agree that it would be possible to add zero-based indexing to MATLAB, using either new notation or an object that overloaded all of our existing indexing notation. It could be backwards compatible in the sense that old code that didn't know about or use the new stuff would still work.
- he didn't like it, but did eventually admit that it was, according to the definition of the term, backward compatible. of course, to really make this useful anything that returned indices (like min(), max(), find(), etc.) would have to be modified to return the correct indices for these arrays that don't start with index 1. but they utterly failed to prove why those could not be done in time, once the MATLAB variables (objects in C++) where generalized to subtract something other than 1 from the indices to get the address of the element in the array. why not subtract "n" which is initially set to 1 when the MATLAB variable is first created and can only be changed with a rebase() or similarly named call that would change that property just like the present reshape() changes the upper limits of the indices? r b-j 23:06, 6 November 2006 (UTC)
-
-
-
-
-
-
-
- (replying to Baccyak4H) I don't think it's correct to describe it as a "drawback". Usually, it is precisely what you want. I'd describe it as a "design choice". Anyway, I had a go at rewriting the paragraph.
- Another problem with the "criticism" section is that it seems not to be supported by any reference (WP:NOR is the applicable acronym). -- Jitse Niesen (talk) 00:16, 7 November 2006 (UTC)
- well, in an earlier version there was some reference: Edsger W. Dijkstra Why numbering should start at zero or the hand-written original and i referenced the DFT definition. also, even though i do not dispute your edit, Jitse ("This matches the definition of a matrix in mathematics"), it should be said that the convention to start numbering sequence at 1 is just an accident of history. there is no natural motivation or mandate to do so and i think that Dijkstra (as well as simple unsigned binary numbers) show why. but, i am not advocating that WP depart from the convention, only that this criticism is legit. r b-j 05:50, 7 November 2006 (UTC)
- So do I. I'm not as sure as r b-j about the compatibility issues and I think Mathworks people have weighted the consequences of both the status quo and a change (have they learnt to be very careful with new decisions, I'm sometimes doubtful), but I totally agree it's a nuisance for DSP. If one were going to design a language from scratch, index bases should be seriously considered. Engelec 15:15, 7 November 2006 (UTC)
- even so, the real flaw is that it is hard-wired. there would be nothing wrong with the default base of indices for every dimension in the array to be 1, but to insist that this base must always be 1 and make no reasonable provision for setting it to something else (and meaningfully deal with that in the basic operations, as i have spelled out in the USENET posts) can only be a flaw (and an unnecessary flaw). there is no other word for it. "drawback" isn't a bad word for it. insisting that the DC value of the DFT output be placed in bin #1 cannot honestly be identified as a "feature". how did he put it in The Bonfire of the Vanities (film)?: "when your dog craps on the rug, you clean it up. you don't serve it to the guests and call it 'caviar.'" r b-j 02:52, 8 November 2006 (UTC)
- So do I. I'm not as sure as r b-j about the compatibility issues and I think Mathworks people have weighted the consequences of both the status quo and a change (have they learnt to be very careful with new decisions, I'm sometimes doubtful), but I totally agree it's a nuisance for DSP. If one were going to design a language from scratch, index bases should be seriously considered. Engelec 15:15, 7 November 2006 (UTC)
- well, in an earlier version there was some reference: Edsger W. Dijkstra Why numbering should start at zero or the hand-written original and i referenced the DFT definition. also, even though i do not dispute your edit, Jitse ("This matches the definition of a matrix in mathematics"), it should be said that the convention to start numbering sequence at 1 is just an accident of history. there is no natural motivation or mandate to do so and i think that Dijkstra (as well as simple unsigned binary numbers) show why. but, i am not advocating that WP depart from the convention, only that this criticism is legit. r b-j 05:50, 7 November 2006 (UTC)
-
-
[edit] External links
I do not see why the article on MATLAB should have an external link to LabVIEW's website, and User:Dicklyon seems to agree. I'd say that the link to list of numerical analysis software is enough. -- Jitse Niesen (talk) 06:21, 3 November 2006 (UTC)
- I take no position on whether a link to N.I. might be appropriate. I used to be happy using mex files to control N.I. boards and get work done. Good stuff. But it's not appropriate for any editor's contributions to consist of nothing but N.I. link spam. I told him so on both of tonight's IP addresses. Dicklyon 06:38, 3 November 2006 (UTC)
[edit] Why criticisms?
Why do we even have the criticisms sections? Is this a place for our pov & "original research" about what we don't like about matlab? Or are there criticisms out there that are verifiable and should be reported here? Or what? Seems more like the former. Can we delete it? Maybe start over with a language properties section with more neutral comments, and/or a criticism section to document criticisms that are verifiably out there?
By the way, the bit about no way to modify an object without replacing it is not quite true. It's easy enough to add a field, assign to a field, etc. What's really being discussed is that you can't modify something in a function by passing a refernce, and it's no different between objects and arrays; the language is consistently call-by value. But it also has some pretty clever machinery so that you don't always suffer a copy penalty where you would naively think you might. That kind of optimization of call by value would not be possible if you could also pass references.
Dicklyon 06:29, 7 November 2006 (UTC)
- I'll answer for the third paragraph which I've written. There are facts which are documented in Mathworks manuals, there are facts which can be verified with Matlab and which aren't documented in Mathworks manuals (and that's a criticism), and there are generalizations which are justified but could be qualified as "original research", though I wouldn't dare to pretend they're original. I can sort that if you want. But if the whole section is to be deleted, I prefer to work on something else. Engelec 08:36, 7 November 2006 (UTC)
-
-
- Does the manual say "becomes a nuisance"? (am I looking at the paragraph you're referring to?) Or was that an opinion? I think it would be better to edit the section to be just verifiable facts, rather than remove it. If you find such things published in the form of a criticism, then it's appropriate to this section. Otherwise, a different section title would be more appropriate for contrastive language details. Dicklyon 16:40, 7 November 2006 (UTC)
-
-
-
-
- I guess the manual doesn't say that. It isn't an opinion, it's a fact. But if you feel you must enforce WP policy this far, please go ahead. At least I'll have learnt something new about Wikipedia. Engelec 23:59, 7 November 2006 (UTC)
-
-
-
-
-
-
- I can see why you might see the "nuisance" thing as fact. But is it a verifiable fact? Is there a credible source to whom we can attribute the notion that it is a nuisance? If not, I don't see how we can take it to be other than either opinion or "original research". I do feel that wikipedia policy is worth following here; I'm hoping it doesn't fall to just me to "enforce" it. Dicklyon 00:18, 8 November 2006 (UTC)
-
-
-
-
- it's not an ad for the Math Works, Dick. if the critique is accurate and salient, there is no reason for it not to be there. disputing either the accuracy or significance of the criticism is something that is expected. r b-j 14:47, 7 November 2006 (UTC)
-
-
- As Jossi keeps telling me, the wikipedia criterion is verifiability, not truth. Anything that can be sourced is verifiable, but most of things I tagged as "citation needed" can not, I suspect, because they are just opinions about how a particular property of matlab is "annoying" or "nuisance" or "serious shortcoming".
-
-
-
- I took out the part that I thought was inaccurate. As to significance, that's a matter of opinion that I don't want to get in to. But let's stick to verifiable criticisms and neutral properties.
-
-
-
- If the section is to be called "criticisms" it should be for documenting criticisms that have been published about matlab. The neutral language properties should be in another section about contrasting properites with other languages or something like that, and your opinions of how serious or nuisance those differences are should not really be a part of it.
-
-
-
- Dicklyon 16:20, 7 November 2006 (UTC)
-
Quick look at GBS finds some pubished criticisms, but not much like what we have here. [4] [5] [6] [7] [8] [9] Dicklyon 16:35, 7 November 2006 (UTC)
- It depends whether you prefer criticisms which are obsolete (1994 for double matrices as the only type or even 2004 for the comment on Matlab-to-C compiler) or laughable (Matlab should also be symbolic, but is already too complicated) but published, or based on experience which anybody can check and reproduce. But since you said you didn't care about truth... Engelec 23:59, 7 November 2006 (UTC)
-
- You've got me all wrong. The reason Jossi keeps telling me that is that I do care about truth. I particularly care that we do not include untrue things as if they are true, just because someone said it. But I also agree with the policy that things we include should be verifiable. I'm not suggesting we include obsolete criticisms, just pointing out that there are some published criticisms we could draw on, instead of making up our own, which is not the wikipedia way. Dicklyon 00:15, 8 November 2006 (UTC)
-
-
- The policy is quite clear that criticisms can only be presented if they are sourced. You cannot base them on experience, since everyone has different experiences (see, e.g., Paul's comment above that he doesn't consider one-based arrays as a problem). Of course that doesn't mean we should include ridiculous criticisms. If we can't find any decent published criticisms, then we shouldn't mention any. -- Jitse Niesen (talk) 00:43, 8 November 2006 (UTC)
-
-
-
-
- the universally accepted definition of the DFT is:
- yet there is no direct reference for this in the DFT article. shall we insist that they refer to any one of hundreds of textbooks that define it that way (with the possible variance of where the scaling factor 1⁄N goes)? it is defined in MATLAB as
- .
- shall i refer to the MATLAB page where that definition is? then shall i quote the MATLAB manuals that, in the introduction to the language, say:
- MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation.
- MATLAB integrates numerical analysis, matrix computation, signal processing, and graphics in an easy-to-use environment where problems and solutions are expressed just as they are written mathematically. ??
- the fact is MATLAB, in this very specific case, objectively fails to perform as promised. it does not express the "problems and solutions ... in familiar mathematical notation" or "just as they are written mathematically". the problem is systemic, not just the misdefinition of the DFT. it's a flaw that forces them (and the MATLAB programmer) to misdefine the DFT, discrete convolution of sequences, and other formulae that is both naturally expressed and defined in the literature as having zero and/or negative indices. and an unnecessary flaw. to deny that this is a bona fide flaw, from the very definition of the term, is akin to saying McDonalds serves really high quality food. in both cases, McDonalds and TMW are satisfied with the quality of the product they market when they should not be. r b-j 03:26, 8 November 2006 (UTC)
- the universally accepted definition of the DFT is:
-
-
-
-
-
-
- I'm not interested in discussing whether it's a flaw or not. The only thing to be discussed here is whether it should be mentioned on Wikipedia that it is a flaw. You are collecting and combining information from different sources to arrive at a critism of Matlab. WP:NOR#Synthesis of published material serving to advance a position says specifically that that is not allowed here. -- Jitse Niesen (talk) 03:39, 8 November 2006 (UTC)
-
-
-
[edit] Changed criticisms to limitations and downsides
It's a partial fix. We might still want a criticisms section if someone finds some verifiable criticisms to support. What I've changed it to is a more neutral statement of some limitations, toned down to remove hyperbole like "very" and "must" and "especially" and value judgements like "nuisance". The inclusion of facts about matlab in this section is still somewhat based on opinion of which language features are "limitations" or "downsides", but I think it's much less opinion-based than before.
I'm sure it can be improved, so go for it. Dicklyon 04:18, 8 November 2006 (UTC)
-
- Good work, this is definitely an improvement. As you say it is quite subjective. For example I find it annoying that I cant define a function within a .m script, but I certainly wouldnt regard this as a problem that deserves a mention in an encyclopedia. Paul Matthews 14:40, 9 November 2006 (UTC)
First time I've read this article and the Limitations section strikes me as a bit biased (clearly written by a C programmer). Who else would say that using parentheses to index arrays and enclose function parameters was erratic syntax, when FORTRAN, Pascal, Ada, Modula all use this same syntax. My inclination would be to delete that whole paragraph about erratic syntax. On the other hand some of the later paras might have more substance. Sangwine 21:01, 15 December 2006 (UTC)
What about the claim "MATLAB is a proprietary product of The MathWorks, so users are subject to vendor lock-in."? Isn't GNU Octave supposed to be source compatible? // Liftarn
- there's a lot of MATLAB calls (especially toolbox calls) that Octave does not yet support. r b-j 15:57, 31 January 2007 (UTC)
[edit] Inappropriate Material
The content below is unsourced, so it doesn't belong in the article. Wikipedia isn't a review site. Nor is Wikipedia a place to publish original thought. This smacks of a PR job done by MATLAB competitors. The material can be re-added only if it can be attributed to a reliable source. Jehochman (Talk/Contrib) 13:09, 11 April 2007 (UTC)
[edit] Limitations
MATLAB is a proprietary product of The MathWorks, so users are subject to vendor lock-in. Some other source languages, however, are partially compatible and provide a migration path.
The language shows a mixed heritage with a sometimes erratic syntax. For example, MATLAB uses parentheses, e.g. y = f(x)
, for both indexing into an array and calling a function. Although this ambiguous syntax can facilitate a switch between a procedure and a lookup table, both of which correspond to mathematical functions, a careful reading of the code may be required to establish the intent.
Many functions have a different behavior with matrix and vector arguments. Since vectors are matrices of one row or one column, this can give unexpected results. For instance, function sum(A)
where A
is a matrix gives a row vector containing the sum of each column of A
, and sum(v)
where v
is a column or row vector gives the sum of its elements; hence the programmer must be careful if the matrix argument of sum
can degenerate into a single-row array. While sum
and many similar functions accept an optional argument to specify a direction, others, like plot
, do not, and require additional checks. There are other cases where MATLAB's interpretation of code may not be consistently what the user intended (e.g. how spaces are handled inside brackets as separators where it makes sense but not where it doesn't, or backslash escape sequences which are interpreted by some functions like fprintf
but not directly by the language parser because it wouldn't be convenient for Windows directories). What might be considered as a convenience for commands typed interactively where the user can check that MATLAB does what the user wants may be less supportive of the need to construct reusable code.
Though other datatypes are available, the default is a matrix of doubles. This array type does not include a way to attach attributes such as engineering units or sampling rates. Although time and date markers were added in R14SP3 with the time series object, sample rate is still lacking. Such attributes can be managed by the user via structures or other methods.
Array indexing is one-based which is the common convention for matrices in mathematics, but does not accommodate the indexing convention of sequences that have zero or negative indices. For instance, the DFT (or FFT) is defined with the DC component at index 1 instead of index 0, which is not consistent with the standard definition of the DFT. This one-based indexing convention is hard coded into MATLAB, making it impossible for a user to define their own zero-based or negative indexed arrays to concisely model an idea having non-positive indices.
MATLAB doesn't support references, which makes it difficult to implement data structures that contain indirections, such as open hash tables, linked lists, trees, and various other common computer science data structures. In addition, since the language is consistently call-by-value, it means that functions that modify array or object values must return these through output parameters and the caller must assign those modified values for the change to be persistent.
The rest of the article is equally unsourced and unencyclopedic. Before we throw it all out, though, let's tag it and see if some can come up with appropriate references. We already worked on this section a while back, changing it from opinions of disadvantages to more objective limitations. Should be easy to source each item, or remove if not. Dicklyon 14:22, 11 April 2007 (UTC)
- How about a citation to the instruction manual? Most of this is fact: the last paragraph is, for example, as is the second from last, as is the third from last. The first two are trickier, and the third does confuse fact with interpretation thereof. Splash - tk 00:23, 14 April 2007 (UTC)
- Please do go ahead and add what refs you can. Then it will be clear what else needs to be worked on. Dicklyon 01:02, 14 April 2007 (UTC)
- i wrote the paragraph regarding Array indexing. other than the MATLAB manual, what source should i be using? it's clear and obvious to anyone using MATLAB that the arrays indices start at 1 and it is hard-wired. it's not something you can change in Preferences nor something you can change with a MATLAB call. it's equally clear and obvious to anyone using the DFT (of which the FFT is simply a "fast" implementation of) that the indices naturally start at 0. but in MATLAB it's 1. so they are not "source-compatible". this section used to be called Criticisms and someone renamed it Limitations because they thought it was somehow more NPOV. i am completely opposed to taking this out. then the article because an ad for TMW. identifying accurate criticisms of MATLAB (as well as strengths) is a perfectly appropriate thing for a neutral encyclopedia, and i also disagree that there should be no "review" of MATLAB here. Wikipedia is here for information. useful and neutral information. if we can help someone make an informed and optimal buying decision about MATLAB before having to commit, then Wikipedia served a useful purpose. that decision might well be to buy it. BTW, i use MATLAB a lot, despite my reservations. Octave still doesn't have all of the functionality of MATLAB and i find MATLAB to be, warts and all, still both useful and necessary. r b-j 08:31, 14 April 2007 (UTC)
- Absolutely agree that "identifying accurate criticisms of MATLAB (as well as strengths) is a perfectly appropriate thing." We just need to distiguish between identifying (with sources) versus making up our own criticisms. Dicklyon 16:07, 14 April 2007 (UTC)
- i wrote the paragraph regarding Array indexing. other than the MATLAB manual, what source should i be using? it's clear and obvious to anyone using MATLAB that the arrays indices start at 1 and it is hard-wired. it's not something you can change in Preferences nor something you can change with a MATLAB call. it's equally clear and obvious to anyone using the DFT (of which the FFT is simply a "fast" implementation of) that the indices naturally start at 0. but in MATLAB it's 1. so they are not "source-compatible". this section used to be called Criticisms and someone renamed it Limitations because they thought it was somehow more NPOV. i am completely opposed to taking this out. then the article because an ad for TMW. identifying accurate criticisms of MATLAB (as well as strengths) is a perfectly appropriate thing for a neutral encyclopedia, and i also disagree that there should be no "review" of MATLAB here. Wikipedia is here for information. useful and neutral information. if we can help someone make an informed and optimal buying decision about MATLAB before having to commit, then Wikipedia served a useful purpose. that decision might well be to buy it. BTW, i use MATLAB a lot, despite my reservations. Octave still doesn't have all of the functionality of MATLAB and i find MATLAB to be, warts and all, still both useful and necessary. r b-j 08:31, 14 April 2007 (UTC)
- Please do go ahead and add what refs you can. Then it will be clear what else needs to be worked on. Dicklyon 01:02, 14 April 2007 (UTC)
The trouble with "Limitations", sourced or unsourced, is that anything that doesn't work the way one person expects is a limitation. Doesn't handle nuclear physics? It's a limitation. Doesn't handle terabyte datasets? It's a limitation. Doesn't have vi keystroke support? It's a imitation. Even a source doesn't really help because that's just one person's opinion. DJ Clayworth (talk) 17:57, 15 April 2008 (UTC)
- Also, there is a general problem with criticism sections of this type: They are difficult to source to Wikipedia standards and so end up being sourced to things like Usenet. --Pleasantville (talk) 18:05, 15 April 2008 (UTC)
[edit] Easter Eggs
Has anyone considered adding an Easter Eggs section. There are quite a few random extras hidden in MATLAB that many people don't know about. Typing the word "why" for instance generates completely random responses. Typing "toilet" gives a graphical simulation of a toilet. I would also be interested in seeing the list grow as more Wikipedia users edit the article. —The preceding unsigned comment was added by 12.216.63.82 (talk) 00:43, 12 April 2007 (UTC).
There was an "Easter eggs" section, but someone removed it for being inappropriate. I don't know what the Wikipedia standards are for such things. Matthew Simoneau 16:43, 19 April 2007 (UTC)
Many articles have a "Trivia" section. This would seem adequate to me. --John.constantine 14:09, 7 May 2007 (UTC)
- Trivia sections are officially discouraged, and should include a tag like this:
Trivia sections are discouraged under Wikipedia guidelines. The article could be improved by integrating relevant items and removing inappropriate ones. |
- If you add one, I will remove it. Dicklyon 14:41, 7 May 2007 (UTC)
[edit] Userbox
I just discovered MATLAB's userbox. To add one to your user page, just type {{user matlab}}
. Matthew Simoneau 16:38, 19 April 2007 (UTC)
[edit] Computer Algebra System
Why is this in the category for computer algebra systems? As far as I know there isn't any way to do symbolic manipulation with matlab, is there? risk 12:31, 14 October 2007 (UTC)
- Yes, there is. I think it has an interface to Maple, iirc. But if it's not detailed in the article, it shouldn't be in that category. Dicklyon 16:41, 14 October 2007 (UTC)
-
- Yes, its in an optional "toolbox", and it is a crude Maple interface. Should not be in cat. Billlion 17:02, 14 October 2007 (UTC)
-
[edit] Toolboxes
I think Matlab's collection of toolboxes are notable, but they're not mentioned in the article except in connection with Maple.
MusicScience (talk) 20:38, 20 January 2008 (UTC)
[edit] Examples
My use case is that I do not know MATLAB but want to get an impression as input to the selction of a numerical tool for a project. I like the beginning of the syntax section (which is also an example section) as it is self-contained in explaining the examples. This is done consistently until we get to the magic square M example, where we encounter the line
(J,I) = meshgrid(1:n)
but the meaning of "meshgrid" is not explained. Thus, I do not really understand that example. Similarly in the 2D sinc example, where we encounter "meshgrid" again, and also other new notation such as ".^" and "eps".
I miss some more advanced examples - like with built-in special functions (if it has some?) how can one handle I/O. Can I interface with external code and examples of how to do that. How about reporting? All in all I miss some more information about the possibilities rather than the limitations. -- Slaunger (talk) 12:34, 4 March 2008 (UTC)
- A quick search for matlab meshgrid or matlab eps would find you what you need. Add the info the article if you think like. Dicklyon (talk) 15:41, 4 March 2008 (UTC)
-
- Thank you for responding. I did the same search and found my answers. I do not mind contributing, but I prefer to do it on topics which I am knowledgable about, and secondarily I have reservations at contributing here, as my written English is unworthy en.wikipedia. It was just a suggestion for improvement. -- Slaunger (talk) 20:55, 4 March 2008 (UTC)
[edit] C-Mex files
Someone should write something of C-MEX files in MATLAB. It may be helpful to readers.Vice regent 16:47, 15 May 2008 (UTC)