Documents

Untitled

Description
What are the main differences between Scilab an... http://www-irma.u-strasbg.fr/~sonnen/SCILAB_HE... What are the main differences between Scilab and MATLAB? Functions Functions in Scilab are NOT Matlab m-files but variables. One or several functio ns can be defined in a single file (say myfile.sci). The name of of the file is not necessarily related to the the name of the functions. The name of the function(s) is given by function [y]=fct1(x) ... function [y]=fct2(x) ... The function(s) are not
Categories
Published
of 2
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Transcript
  WhatarethemaindifferencesbetweenScilaban...http://www-irma.u-strasbg.fr/~sonnen/SCILAB_HE...WhatarethemaindifferencesbetweenScilabandMATLAB?FunctionsFunctionsinScilabareNOTMatlabm-filesbutvariables.Oneorseveralfunctionscanbedefinedinasinglefile(saymyfile.sci).Thenameofofthefileisnotnecessarilyrelatedtothethenameofthefunctions.Thenameofthefunction(s)isgivenbyfunction[y]=fct1(x)...function[y]=fct2(x)...Thefunction(s)arenotautomaticallyloadedintoScilab.Usuallyyouhavetoexecutethecommandgetf( myfile.sci )beforeusingit.Functionscanalsobedefinedon-line(orinsidefunctions)bythecommanddeff.Toexecuteascriptfileyoumustuseexec( filename )inScilabandinMatlabyoujustneedtotypethenameofthefile.CommentlinesScilabcommentsbeginswith://Matlabcommentsbeginswith:%VariablesPredefinedvariablesusuallyhavethe%prefixinScilab(%i,%inf,...).Theyarewriteprotected.StringsStringsareconsideredas1by1matricesofstringsinScilab.Eachentryofastringmatrixhasitsownlength.BooleanvariablesBooleanvariablesare%T,%FinScilaband0,1inMatlab.Indexingwithbooleanvariablesmaynot1of4Thursday09February201210:09AMWhatarethemaindifferencesbetweenScilaban...http://www-irma.u-strasbg.fr/~sonnen/SCILAB_HE...producesameresult.Examplex=[1,2];x([1,1])[whichisNOTx([%T,%T])]returns[1,1]inScilaband[1,2]inMatlab.Alsoifxisamatrixx(1:n,1)=[]orx(:)=[]isnotvalidinMatlab.PolynomialsPolynomialsandpolynomialmatricesaredefinedbythefunctionpolyinScilab(built-invariables).TheyareconsideredasvectorsofcoefficientsinMatlab.Emptymatrices[]+1returns1inScilaband[]inMatlab.PlottingExceptforthesimpleplotandmesh(plot3d)functions,ScilabandMatlabarenotcompatible.ScicosScicos(Scilab)andSimulink(Matlab)arenotcompatible.AdictionaryMostbuiltinfunctionsareidenticalinMatlabandScilab.Someofthemhaveaslightlydifferentsyntax.Hereisabrief,partiallistofcommandswithsignificantdifferentsyntax.MatlabScilab equivalent allandanyor2of4  Thursday09February201210:09AMWhatarethemaindifferencesbetweenScilaban...http://www-irma.u-strasbg.fr/~sonnen/SCILAB_HE...balancebalancclockunix('date')computerunix_g('machine')cputimetimerdeleteunix('rmfile')dirunix_g('ls')echomodeeigspecorbdiagevalevstrexistexists+typefclosefile('close')feofferrorfevalevstrandstrcatfilterrtitrfinite(x<%inf)fopenfile('open')freadreadfseekfileftellfwritewritebglobalhomeisglobal3of4Thursday09February201210:09AMWhatarethemaindifferencesbetweenScilaban...http://www-irma.u-strasbg.fr/~sonnen/SCILAB_HE...isinf(a)a==%infisnan(a)a~=aisstr(a)type(a)==10keyboardpause+resumelasterrlookforaproposmorelinespackstacksizepausehaltqzgspec+gschurrandnrandremmodulosetstrcode2strstrcmp(a,b)a==buicontroluimenugetvalueunixunix_gversionwhichwhereisnargin[nargout,nargin]=argn(0)nargout4of4Thursday09February201210:09AM
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x