Connect with us

"Matlab to Scilab for Dummies" anywhere?

Discussion in 'Electronic Design' started by Joerg, Jul 8, 2006.

Scroll to continue with content
  1. Joerg

    Joerg Guest

    Hello All,

    After finding some possibly useful routines to calculate filters (wave
    digital in this case) I got stuck because these are for Matlab. I only
    have Scilab and next to no experience with it. The files are mostly *.m,
    some *.p and a few graphics GUI files *.fig. Scilab doesn't understand
    any of these.

    Is there a text somewhere, along the lines of "Matlab to Scilab file
    conversion for dummies"?

    The brief instructions for routines like "loadmatfile" on Scilab's site
    are simply not verbose enough for an analog guys like me :-(
     
  2. Martin Blume

    Martin Blume Guest

    Octave (www.octave.org) might be closer to MATLAB than Scilab.

    HTH
    Martin
     
  3. john

    john Guest

    Hi Joerg,

    I dont think its a matter of conversion, a .mat file is a bianary used
    by matlab, you can use it to port data around to other applications,
    but not much else... The .m files are ASCII. .fig are either gui tools
    or graphs. I think you will have to get matlab to use its filter
    design tool (a gui that gives you the filter coefficients for a dsp,)
    or the dsp toolbox, etc. Matlab is an excelent tool if you plan to
    start doing dsp.

    good luck,

    John

    Joerg wrote:
     
  4. Joerg

    Joerg Guest

    Hello Martin,
    Thanks, I'll give it a try.
     
  5. Joerg

    Joerg Guest

    Hello John,
    Yes, but also very expensive. There is the usual discrepancy, really
    high prices for individuals and academia pays less than 1/3 of that. At
    least it used to be that way. It's hard to justify to shell out almost
    $2k just to try something out since I normally don't do much work that
    would need it.

    BTW, this is for a uC so it'll be one of those shoe horn and sledge
    hammer jobs.
     
  6. Joel Kolstad

    Joel Kolstad Guest

    Academic pricing is based on the presumptions that (1) getting the tools
    into the hands of future engineers will lead to future sales and (2)
    academic institutions often don't have that much money around anyway, so
    some sale is better than no sale. The student edition of Matlab is quite
    cheap -- $100! (http://www.journeyed.com/itemDetail.asp?T1=42381696 R).

    It is unfortunate that a lot of tools are clearly not priced for the "casual
    commercial user"... we just purchaesd a copy of Matlab to the tune of $11k
    (that included a bunch of toolboxes and Simulink), and while we can justify
    that based on the contract we'll be using it for, it definitely stings. On
    the other hand, it's not *too* bad when you compare its utility (if you can
    use it on a regular basis) to that of, e.g., a $100k network analyzer...

    Whatever happened to those companies where the idea was that you'd just
    logon to their Windows terminal servers (or the Unix equivalent) and
    effectively just "rent" the tools for the time that you actually needed
    them? I suspect you'd be willing to pay, say, $10 to use Matlab in such a
    fashion, no?

    ---Joel
     
  7. Joerg

    Joerg Guest

    Hello Joel,
    Future sales is what companies believe will happen. But then the
    student-turned-engineer files a cap-ex and his new boss throws it right
    back at him with a big red X across it.

    Maybe I should sign up for studies of philosophy or whatever and then
    order? But that wouldn't be righteous.

    Some EDA pricing clearly has spiraled out of sanity. OTOH that inspires
    new companies to jump in. When OrCad went to >$1.7K just for the
    schematic package I simply pulled the plug on them and switched to
    Cadsoft. Haven't regretted it. Even if Cadence now came back with a
    really sweet teaser offer it'll be too late.

    Yeah but, you can often find a used analyzer that's good enough for a
    small fraction of that. I have done that a lot, bought stuff when
    companies closed shop, needed to upgrade and so on. In fact, more than
    half my lab grew together that way. Works fine. There is some gear that
    I bought used and it looked like it had been used once, if that.
    Actually, there is some equipment that I could not have bought any other
    way because HP/Agilent quit making them.

    With SW you can't usually do that because when companies upgrade they
    are typically not allowed sell their old licenses.

    Sure. Just for kicking the tires there won't be any confidential data in
    design files so it could all be run via the web. The perfect biz model
    would be similar to prepaid cell service. They should give you free
    access to play with it using their demo stuff. Then when you feel you
    can wing it you pay for the minutes of runtime.
     
  8. Joel Kolstad

    Joel Kolstad Guest

    Hi Joerg,

    Depends a lot on the company; I believe that The Mathworks probably has a
    large number of copies being used at all the Big Electronic Design Houses
    (Intel, Tektronix, Skyworks, Motorola anyone doing DSP, etc.)
    I've thought of doing that just to get IEEE conference price reductions. :)
    (Are you an IEEE member, Joerg? It seems to me that the prices of most
    everything they do these days is high enough that it's seldom justifiable
    unless you're working for those big guys... or in academia...)
    There's a lot of overpriced EDA software out there, yet plenty of companies
    (cough... CADENCE... cough... MENTOR GRAPHICS... cough!) seem able to to get
    others to buy it on a continual basis.
    Certainly true, although I think it does largely depend on what you're
    doing. Something like, say, a $50-100k spectrum analyzer today will be able
    to perform IQ demodulation and many automated measurements on various
    complicated standards such as WiMax or CDMA-2000. Although you can often
    find something like an HP 8590-series spectrum analyzer where the raw RF
    performance is just about as good (other than IQ demodulation, since that
    requires two mixers), realistically few people are going to be able to sit
    down and use such an instrument to make measurements on any modern digital
    communications system.

    Slight change of topic here:

    The success rate of product design when the engineering is contracted out
    almost seems independent of how much the engineers are being paid... in
    fact, it might even be higher for lower dollar contracts, because only guys
    who really *know* they can do the job or are really desperate for any job
    and will keep at it until it works will bid! On the other hand, with the
    high dollar contracts, there's at least usually money left over to call in
    someone like you when things don't work... :)

    Given your skills and reputation, I would imagine you can pretty much
    "cherry pick" which contracts you're willing to accept these days?

    ---Joel




    ---Joel
     
  9. Joerg

    Joerg Guest

    Hello Joel,
    Yes, I am a member (UFFC, EMBS).
    It's not just EDA. Got a dentist bill in the mail today and almost blew
    a gasket. A whopping $400 (four hundred!) for well under an hour's work.
    Should have become a dentist. They can bill whatever they want, they
    aren't regulated, clients are almost hostage once in the chair, it's a
    gold mine.

    True. But it's almost a prerequisite that there is some large government
    contract or grant behind it. Or lots of VC.

    In my experience you get what you pay for. But you are right in that a
    high rate does not guarantee quality of design. Had to redesign a lot of
    stuff that was done by "big shots". It always worked on the bench but
    not in production.

    It's nearly all word of mouth. This means that I am still in the med
    electronics biz because that is where I started 20 years ago. Slowly I'd
    like to migrate out of that though, can't get PL insurance from any US
    carrier for this field anymore.
     
  10. Guest

    Goodness, didn't you get an estimate, or a second opinion, before your
    dentist began work?

    About a year ago, we switched dentists (bad service); our new dentist
    wanted to do about $500 worth of major crown work for my wife. Decided
    to get a second opinion. Second opinion said the crows weren't
    necessary; only a filling. We switched dentists again to that one
    ASAP.

    Michael
     
  11. Guest


    Wow, open source? That's really neat. I'll have to try it when I get
    home...

    Anyone know of an open-source clone of Mathematica? Or is that too
    much to hope for... ;) ?

    Michael
     
  12. Joel Kolstad

    Joel Kolstad Guest

    This isn't a direct answer, but at least in Matlab a very large percentage
    of the functions are themselves just script files that you can edit and try
    to glean an algorithm from... for complex algorithms there's often a pointer
    to a paper as a reference.

    Unfortunately, I expect that Matlab/Mathematica/MathCAD/etc. are going to
    start heading the direction of the "Numerical Recipies in C" book did some
    years ago now -- cleaining that, while the algorithm there's aren't
    proprietary (since, after all, they usually came from public references!),
    the particular implementations are... which leaves you in somewhat murky
    legal waters when realistically a given algorithm pretty much implies 95% of
    the implementation. In particular, I noticed that MathCAD 6 back in the
    late '90s still came with a manual that provided plenty of algorithm/paper
    references... whereas by the time MathCAD 2002 was released, this
    documentation had vanished as far as I could tell... that's just one step
    away from deciding the algorithms themselves are the company's own IP.

    That's a good reason to hope that OCtave keeps evolving!
     
  13. Martin Blume

    Martin Blume Guest

    Don't know, but maybe Maxima
    (http://maxima.sourceforge.net/index.shtml)
    might fill the bill?

    Regards
    Martin
     
  14. Guest


    Ooh, I'll have to try that, thanks!

    In school, we had Mathematica workstations in several of the
    engineering computer labs. One of the more memorable tasks I had a
    workstation do was to solve a system of nonlinear equations - about 100
    of them (for sizing a distillation column).

    Thanks,

    Michael
     
  15. Tim Wescott

    Tim Wescott Guest

    Octave is quite compatible with MatLab.

    I like the SciLab syntax and environment better, but it's _not_ friendly
    to beginners (but then neither are MatLab or Octave).

    SciLab does have routines to translate a matlab script into a scilab
    script. Typing 'help matlab' at the command line will get you quite a
    few hits. The conversion covers the *.m files, but I'm not sure what
    the *.p or *.fig files do, or if SciLab can handle them. There is a
    SciLab newsgroup on which you can post your questions --
    comp.soft-sys.scilab.org.

    Absent considerations of being compatible with industry, I recommend
    SciLab over MatLab - even if both were free. If you're going to do a
    lot of work with customers who want m files then you're kind of stuck
    with MatLab or Octave, but I haven't had that happen to me more than
    once in the last three years.

    --

    Tim Wescott
    Wescott Design Services
    http://www.wescottdesign.com

    Posting from Google? See http://cfaj.freeshell.org/google/

    "Applied Control Theory for Embedded Systems" came out in April.
    See details at http://www.wescottdesign.com/actfes/actfes.html
     
  16. Joerg

    Joerg Guest

    Hello Michael,
    It's rework on something done in Europe and there aren't too many that
    would even touch it.

    Estimates with dentists are often elusive. When you are sitting there
    and the pain is shooting up to the cranium there ain't much motivation
    to shop ;-)

    Well, we did shop around and for most work like root canals the others
    were even higher. Plus our dentist is really good. It's just that
    sometimes the bills make you cringe.

    If we would just live closer to the Mexican border this burden would be
    much less heavy.
     
  17. Joerg

    Joerg Guest

    Hello Tim,
    That's what I had tried, using the "loadmatfile" routine. I tried
    several m-files and got errors and aborts on all of them.

    In the old days things were easier. Universities would compile
    everything into a nice DOS executable like the program by
    Prof.Mildenberger's team. It has a wave digital filter section which is
    what I am after. I had bought this program from them around 1990. Fair
    price and most of the money went to good cause. Later it became
    shareware but now he is retired and his site is down.

    Nowadays they often post vast piles of files, either for some obscure
    operating system system or for a math program that they happened to
    have. I really don't understand why they don't walk the last mile and
    create a nice stand alone package. They could make money from that and
    most faculties are in dire need of funds. That would also serve as a
    teaching tool to students and Ph.D. candidates so they learn project
    management, proper documentation, and what it takes to create a saleable
    product.

    Well, mostly I am stuck with industry standards. For example, I must
    create my docs in Word. In this case I'd just like to try out some
    filter design software but I am finding that the efforts to create an
    environment for these to run might outweigh the benefits. Might as well
    go back to notepad, sliderule and HP calculator. Plus maybe some Excel
    spreadsheeting.
     
  18. Tim Wescott

    Tim Wescott Guest

    Email me the files -- I'll give it a whirl and either let you know or
    send you working ones.

    --

    Tim Wescott
    Wescott Design Services
    http://www.wescottdesign.com

    Posting from Google? See http://cfaj.freeshell.org/google/

    "Applied Control Theory for Embedded Systems" came out in April.
    See details at http://www.wescottdesign.com/actfes/actfes.html
     
  19. Joerg

    Joerg Guest

    Hello Tim,
    Thanks. I'll do that tomorrow. Have to find out which ones are
    important. The docs are, well, skimpy and it seems that dozens of are
    are being called from the GUI at times. But at least they are all small,
    a few kB.

    Now it's off to the barbie, pork chops tonight. Then a neighbor called
    saying she has a couple of rather active hornets nests. Oh man...
     
  20. Jim Thompson

    Jim Thompson Guest

    Get some freeze spray... knocks 'em right down.

    ...Jim Thompson
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-