f

#### Digits of Accuracy: Maple Toolbox for Matlab

```I have been using the maple toolbox for matlab...... I am interested in keeping a large number of digits in computations but using some of the builtin MATLAB functions.

In Maple, it is quite easy to set the maximum number of digits.... you simply use kernelopts(maxdigits).

I would like to also keep a large number of digits available when working in MATLAB and/or when working in Maple and having MATLAB performing a few calculations.

For example the following is an example to use Maple and have Matlab peform a matrix inversion and send the result back to Maple.....

with(Matlab)
maplematrix_a := Matrix([[3, 3, 2], [4, 5, 2], [6, 2, 4]])
maplematrix_b := Matrix([[3, 2, 5], [1, 8, 2], [7, 3, 4]])
Matlab[setvar]("matlabmatrix_a", maplematrix_a)
Matlab[setvar]("matlabmatrix_b", maplematrix_b)
Matlab[evalM]("c=inv(matlabmatrix_b)*matlabmatrix_a")
Matlab[getvar]("c")

does anyone know how I could have Matlab keep a large amount of digits for example for the inversion, if I were to send it back to Maple.....

Also does anyone have any idea how to keep a large number of digits in Matlab? Thanks.
```
 0
omegayen (84)
7/23/2009 5:51:01 PM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader.

2 Replies
478 Views

Similar Articles

[PageSpeed] 50

```On Jul 23, 10:51=A0am, "omegayen " <omega...@ameritech.net> wrote:
> I have been using the maple toolbox for matlab...... I am interested in k=
eeping a large number of digits in computations but using some of the built=
in MATLAB functions.
>
> In Maple, it is quite easy to set the maximum number of digits.... you si=
mply use kernelopts(maxdigits).
>
> I would like to also keep a large number of digits available when working=
in MATLAB and/or when working in Maple and having MATLAB performing a few =
calculations.
>
> For example the following is an example to use Maple and have Matlab pefo=
rm a matrix inversion and send the result back to Maple.....
>
> with(Matlab)
> maplematrix_a :=3D Matrix([[3, 3, 2], [4, 5, 2], [6, 2, 4]])
> maplematrix_b :=3D Matrix([[3, 2, 5], [1, 8, 2], [7, 3, 4]])
> Matlab[setvar]("matlabmatrix_a", maplematrix_a)
> Matlab[setvar]("matlabmatrix_b", maplematrix_b)
> Matlab[evalM]("c=3Dinv(matlabmatrix_b)*matlabmatrix_a")
> Matlab[getvar]("c")
>
> does anyone know how I could have Matlab keep a large amount of digits fo=
r example for the inversion, if I were to send it back to Maple.....
>
> Also does anyone have any idea how to keep a large number of digits in Ma=
tlab? Thanks.

How about the VPI toolbox on the FEX?
http://www.mathworks.com/matlabcentral/fileexchange/22725
I think that might be what you're looking for.
-Nathan
```
 0
ngreco32 (530)
7/23/2009 6:20:57 PM
```Nathan <ngreco32@gmail.com> wrote in message <3ce869b2-f59d-4313-a5a3-ec5e271ceaf9@i18g2000pro.googlegroups.com>...
> On Jul 23, 10:51?am, "omegayen " <omega...@ameritech.net> wrote:
> > I have been using the maple toolbox for matlab...... I am interested in keeping a large number of digits in computations but using some of the builtin MATLAB functions.
> >
> > In Maple, it is quite easy to set the maximum number of digits.... you simply use kernelopts(maxdigits).
> >
> > I would like to also keep a large number of digits available when working in MATLAB and/or when working in Maple and having MATLAB performing a few calculations.
> >
> > For example the following is an example to use Maple and have Matlab peform a matrix inversion and send the result back to Maple.....
> >
> > with(Matlab)
> > maplematrix_a := Matrix([[3, 3, 2], [4, 5, 2], [6, 2, 4]])
> > maplematrix_b := Matrix([[3, 2, 5], [1, 8, 2], [7, 3, 4]])
> > Matlab[setvar]("matlabmatrix_a", maplematrix_a)
> > Matlab[setvar]("matlabmatrix_b", maplematrix_b)
> > Matlab[evalM]("c=inv(matlabmatrix_b)*matlabmatrix_a")
> > Matlab[getvar]("c")
> >
> > does anyone know how I could have Matlab keep a large amount of digits for example for the inversion, if I were to send it back to Maple.....
> >
> > Also does anyone have any idea how to keep a large number of digits in Matlab? Thanks.
>
> How about the VPI toolbox on the FEX?
> http://www.mathworks.com/matlabcentral/fileexchange/22725
> I think that might be what you're looking for.
> -Nathan

Hi, Thanks for the reply.... that seems like a solution....... however, the Maple Toolbox for Matlab states "Also, the ability to work with arbitrary precision floating-point numbers is available. As such, computations can be performed using hundreds of digits of accuracy if needed."

I am mainly interested in how I do this? thanks
```
 0
omegayen (84)
7/23/2009 6:32:03 PM

Similar Artilces:

Maple Matlab toolbox
I have Matlab 2010a(64bit) and Maple 15(think 64bit, not sure). When I setup the matlab toolbox, it installs the 32 bit toolbox with maplemex.mex32 file. When I run the code, matlab searches for maplemex.mex64 bit file. Any idea how I can remedy this? I have Visual C++ 2008 Sp1 compiler setup on matlab. Thanks in advance. ...

Differences In Digits between Matlab and Maple
so I was wondering if anyone could help explain the following....... In Maple I execute Digits := 100 evalf(5*sin(15*Pi*(1/16))) and it returns 0.9754516100806413392414243423851112046384580887597740387725104474738165939296229011266265461704519090 In Matlab I execute digits(100) pi2=vpa(pi) vpa(sin((pi2*15)/16))*5 and it returns 0.9754516100806413392414243423851112046384580887597740387725104474738165939296229011266265461704519100 hence there is a difference in the last few digits In maple ....519090 In matlab .... 519100 The problem is vpa(pi). A hint, why are the following two lines returns different results? >> digits(100) >> vpa('pi') ans = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068 >> vpa(pi) ans = 3.141592653589793115997963468544185161590576171875 "omegayen " <omegayen@ameritech.net> wrote in message news:h571ce\$q7c\$1@fred.mathworks.com... > so I was wondering if anyone could help explain the following....... > > In Maple I execute > > Digits := 100 > evalf(5*sin(15*Pi*(1/16))) > > and it returns > > 0.9754516100806413392414243423851112046384580887597740387725104474738165939296229011266265461704519090 > > In Matlab I execute > > digits(100) > pi2=vpa(pi) > vpa(sin((pi2*15)/16))*5 > > and it returns > 0.975451610080641339241424342385111204638458088759774038772510447473816593929622901126626546170451910...

Problem with Maple Toolbox for MATLAB.
I installed the Maple Toolbox for MATLAB, I have both Maple 13 & MATLAB r2009b, so when I try to run the command syms I get this: syms x y ??? Error using ==> sym.sym at 164 Attempt to execute SCRIPT maplemex as a function: /Applications/MATLAB_R2009b.app/toolbox/maple/maplemex.m Error in ==> syms at 57 assignin('caller',varargin{i},sym(varargin{i})); I don't know what the hell is happening I have been trying to do everything but nothing have worked. I am on Mac OS X 10.6.2. What is going on with this issue? Thanks in advance. ...

Problem installing Maple toolbox for MATLAB
Hi all I'm trying to install the Maple toolbox for MATLAB on Windows XP with MATLAB 2010a. The toolbox seemed to install fine (in MATLABROOT/toolbox/maple), but when I open MATLAB and run the following commands I get the following results: >> syms x ??? Undefined function or method 'sym' for input arguments of type 'char'. Error in ==> syms at 47 assignin('caller',varargin{1},sym(varargin{1})); >> which sym -all C:\Program Files\MATLAB\R2010a\toolbox\maple\@sym\sym.m % sym constructor, Has no license available Does anyone know how this can be fixed? Thanks, Oliver In article <hnocdc\$4r5\$1@fred.mathworks.com>, o.j.woodford.98@cantab.net says... > Hi all > > I'm trying to install the Maple toolbox for MATLAB on Windows XP with MATLAB 2010a. The toolbox seemed to install fine (in MATLABROOT/toolbox/maple), but when I open MATLAB and run the following commands I get the following results: > > >> syms x > ??? Undefined function or method 'sym' for input arguments of type 'char'. > > Error in ==> syms at 47 > assignin('caller',varargin{1},sym(varargin{1})); > > >> which sym -all > C:\Program Files\MATLAB\R2010a\toolbox\maple\@sym\sym.m % sym constructor, Has no license available > > Does anyone know how this can be fixed? > > Thanks, > Oliver > The default engine for symbolic calculations is MuPAD. I suspect y...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorpor...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorporation of a priori knowledge in the identif...

how to digitize in matlab
I am new to using matlab 2007a version . I am looking to digitize maps in matlab. I downloaded the Digitize.m file from the site.kindly tell me that What i will do with this file and where will i save this matfile in matlab and how to use this tool. ...

Matlab engine with matlab R2010b
Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

Spawning matlab from within matlab
Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

slow optimization using nonlcon with GA within matlab toolbox and mixed integer problem using GA within Matlab
greeting all, i'm using nonlcon(nonlinear inequality constraint) with GA from the toolbox provided by matlab. does anyone notice the extreme slowlness in evaluating nonlinear constraint as compared to other linear constraint? my problem for nonlinear constraint is as follow c(1)=x+y^2-2*ones(N,1) where x and y are Nx1 vector. which means if N increases, the size of constraint increases. and to clarify, the min problem is sometime like min c'z where z=[x;y], which means x and y are some range of variable within z(just a matter of problem formulation) well, is there anyone with other alternative or is it possible or method in including non-linear constraint directly to fitness function? (well, actually nonlcon deals nonlinear constraint by using Augmented Lagrangian Pattern Search from what i see from the help file, or am i wrong?) and one more question, is there anyone that attempt to attempt to apply mixed integer problem into the GA in matlab? For now, i can only switch before pure integer or pure real number problem, but not mixed at the moment. I will be trying to add in some repair operator to fix up the variable that needs to be integer and other remaining in real number. I'm not sure why you are using ga to solve your problem. Did you find fmincon unsatisfactory in any way? Alan Weiss MATLAB mathematical toolbox documentation On 5/10/2011 11:53 PM, terry wrote: > greeting all, > > i'm using nonlcon(nonlinear inequality constraint)...

embedded matlab function MATLAB R2009a
I downloaded the MS visual C++ 2008 Express Edition and the SDK as detailed in http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L My embedded function didnt work at the beginning because I did "mex -setup" before I installed my SDK. But after I installed the SDK, I ran "mex -setup" in Matlab once again and choose the MS visual C++2008 as my compiler. Then, my embedded matlab function worked. Thanks to the contribution from above! ...

Creating DLL in Matlab and using them in Matlab?
Hi, is it possible to create dll in Matlab and then using it in other Matlab apllication? I've made a simple function and put it into dll. But when I try to use this library in other apllication written in matlab it doesn't works. Any idea? -- Pozdrawiam, e-Shrek hi e-shresk, I once created a matlab dll, and called it in c code. it worked. I guess you have to check whether you dll was built correctly or not. ps. why don't u call matlab function directly? Dnia Mon, 26 Oct 2009 07:19:04 +0000 (UTC), Jun napisaï¿½(a): > hi e-shresk, > > I once created a matlab dll, and called it in c code. it worked. Hmmm. The function is very simple: ========================== function var_o = testlib(var_i) if var_i == '1', var_o = 'jest'; else var_o = 'brak'; end ========================== Compilation: mcc -W lib:xlib -T link:lib testlib After it, I have *.dll *.lib *.h Tryin' to load library: loadlibrary('xlib.dll','xlib.h'); The result is: Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be viewed using: [notfound,warnings]=loadlibrary(...) > In loadlibrary at 394 Where is the problem? > ps. why don't u call matlab function directly? I have a pack of functions that I wouldlike to use with few different matlab compiled programs. -- Pozdrawiam, e-Shrek On Oct 26, 1:47=A0pm, e-Shrek <e-Shrek.wyt...@wytni...

How to measure accuracy in matlab?
Hello all, I just want to ask a question as I am new to matlab when I finished training the network, I want to measure network accuracy by comparing the target class and testing result (i used sim function), how can i do it? Thanks a lot "Dina " <dinaezzat@gmail.com> wrote in message <j4r4c0\$a5i\$1@newscl01ah.mathworks.com>... > Hello all, > > I just want to ask a question as I am new to matlab > > when I finished training the network, I want to measure network accuracy by comparing the target class and testing result (i used sim function), how can i do it? > > > Thanks a lot Hi Dina, Try using Support Vector machine(SVM) to get the accuracy. On Sep 14, 4:55=A0pm, "Dina " <dinaez...@gmail.com> wrote: > Hello all, > > I just want to ask a question as I am new to matlab > > when I finished training the network, I want to measure network accuracy = by comparing the target class and testing result (i used sim function), how= can i do it? > > Thanks a lot More details are needed. How many classes? Did you use separate trn/val/tst sets? How many input/output-target pairs per class for each set? What did you use for training targets ... (ideal input-conditional posterior probabilities ?) Do prior probabilities and misclassification costs have to be considered? Do you need confusion matrices? Do you need error threshold operating curves? Hope this helps Greg Thanks a lot for y...

Error in maple with matlab
Hi all, I am getting following error while executing the below line using matlab maple('m:=',m_char(j,:)); ??? Error using ==> maple at 178 Error using ==> maplemex `:` unexpected I am using matlab R2010a-windows 64bit and maple 15-windows 64bit and my OS windows7 please suggest some idea to resolve this problem...Thanks in advance... Kindly help us.... even I m also getting the same error..... Very thanks in advance.....please please please On 14.11.11 12:10, Nanthini wrote: > Hi all, > I am getting following error while executing the below line using matlab > > maple('m:=',m_char(j,:)); I'm just guessing, but maybe maple(['m:=',m_char(j,:)]); works better for you? Christopher ...

IGES TO Matlab toolbox
Hi, I have an IGES file from which is need to extract entity type 128. Using the IGES to Matlab toolbox, the ParameterData is obtained very easily. But i would like to extract the coefficients and the knot vectors for the entity type 128. Any hint is greatly appreciated. Thanks ...

Lmi matlab toolbox.
A=[-1 -2 1; 3 2 1; 1 -2 -1;]; B=[1 0 1]' E1=[-1 -2 1; 1 3 2; 2 -2 -1;]; E2=[0 0 1]'; D=[0 0 1]'; setlmis([]) Q=lmivar(1,[3 1])%3x3 symmetric matrix Y= lmivar(2,[1 3])%1x3 matrix % 1st LMI lmiterm([1 1 1 Q],1,A,'s')%A*Q+Q*A' lmiterm([1 1 1 Y],-1,B,'s')%_B*Y-(B*Y)' lmiterm([1 1 1 0],D*D')%D*D' lmiterm([1 2 1 Q],1,E1)%E1*Q lmiterm([1 2 1 Y],-1,E2)%-E2*Y lmiterm([1 2 2 0],-1)%-gamma^2*I<-----how to put gamma also. % 2nd LMI lmiterm([-2 1 1 Q],1,1)%Q>0<-------? LMISYS = getlmis gamma1=mat2dec(LMISYS,Q,Y) options = [1e-5,0,0,0,0]; [gamma1opt,qopt]=mincx(LMISYS,gamma1,options) [gamma1opt,yopt]=mincx(LMISYS,gamma1,options) Qopt = dec2mat(LMISYS,qopt,Q) Yopt = dec2mat(LMISYS,yopt,Y) I have to minimize gamma, and to find matrices Q and Y. I am getting errors. I do not if the code is correct. The matrix inequality is: M=[A*Q+Q*A'-B*Y-Y'*B'+D*D' (E1*Q-E2*Y)'; E1*Q-E2*Y -gamma^2*eye(3);] Thanks In advance. Same answer here as on your YALMIP question. "tho" wrote in message <iuj0kg\$sln\$1@newscl01ah.mathworks.com>... > A=[-1 -2 1; 3 2 1; 1 -2 -1;]; > B=[1 0 1]' > E1=[-1 -2 1; 1 3 2; 2 -2 -1;]; > E2=[0 0 1]'; > D=[0 0 1]'; > setlmis([]) > Q=lmivar(1,[3 1])%3x3 symmetric matrix > Y= lmivar(2,[1 3])%1x3 matrix > > % 1st LMI > lmiterm([1 1 1 Q],1,A,'s')%A*Q+Q*A' > lmiterm([1 1 1 Y],-1,B,'s')%_B*Y-(B*Y)' > lmiterm([1 1...

Matlab parallel for loop or Matlab open pool
I am trying to to some computations and I would like to do it in parallel using parfor or by Opening the matlabpool.. as the current implementations is too slow: result=zeros(25,16000); for i = 1:length(vector1) % length is 25 for j = 1:length(vector2) % length is 16000 temp1 = vector1(i); temp2 = vector2(j); t1 = load(matfiles1(temp1).name) %load image1 from matfile1 t2 = load(matfiles2(temp2).name) % load image2 from matfile2 result(i,j)=t1.*t2 end end It work fine but I would really like to know if there is a way to speed thing up ... Thanks a lot in advance! ...

Differences in Digits in Matlab
I posted a thread over at...... http://www.mathworks.com/matlabcentral/newsreader/view_thread/257642#670417...... regarding differences in digits between Maple and Matlab which still has not been fully addressed.... However, the problem I observe is also seen in just Matlab on it's own.... The behavior has to do with the sym object class. (I am using the Maple toolbox for matlab and Matlab R 2009 A 64 bit) As an example >> digits(30) >> vpa(sym('pi'))*.1 ans = 0.314159265358979342695820259867 >> vpa(sym('pi'))*(.9-.8) ans = 0.314159265358979254731225959353 Both of the above are being multiplied by the same number .1 however the case where (.9-.8) is instead being multiplied yields a different result..... Could anyone please shed some light on this for me.... Thanks. omegayen <omegayen@ameritech.net> wrote: >>> vpa(sym('pi'))*.1 > > ans = > > 0.314159265358979342695820259867 >>> vpa(sym('pi'))*(.9-.8) > > ans = > > 0.314159265358979254731225959353 > > Both of the above are being multiplied by the same number .1 however > the case where (.9-.8) is instead being multiplied yields a different > result..... Seems like this is showing up almost daily lately. The above are NOT being multiplied by the same number. Binary computers have limited resolution so ( ...

Why does Matlab do this
What is happening when I type rand(1:10) at the command line? Matlab goes into a 10 minute spin - what's going on? Thanks "Robert" wrote in message <j64asi\$5v4\$1@newscl01ah.mathworks.com>... > What is happening when I type > rand(1:10) > at the command line? > > Matlab goes into a 10 minute spin - what's going on? > Thanks Hi Robert, You're create a 10-D array with that syntax. Do you just want a vector of 10 uniformly distributed random numbers. x = rand(10,1); % or x = rand(1,10); Wayne Hi Wayne, You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! Thanks for the explanation. Robert "Robert" wrote in message <j64d2h\$dvo\$1@newscl01ah.mathworks.com>... > Hi Wayne, > You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! > Thanks for the explanation. > Robert That's fine. Welcome to MATLAB!!! If that's the worst memory-intensive mistake you ever make, you'll be fine :) I've done much, much worse. Wayne ...

code of matlab 7a not working in matlab 2009
I wrote a code in matlab 7a andand it was working over there then i changed computer which was having matlab realease 2009a and it is not working If i install Matlab 7 release 14, will my code work again thanks "moonman" wrote in message <ipmsl7\$23v\$1@fred.mathworks.com>... > I wrote a code in matlab 7a andand it was working over there > then i changed computer which was having matlab realease 2009a and it is not working > > If i install Matlab 7 release 14, will my code work again thanks Can you be more specific about the fact that your code is not working in 2009a but worked in 2007a? It would be helpful if you could narrow down what is not working in 2009a and provide error messages. Wayne ok thanks wyne i will send error message after some hours ...

Matlab 2011: matlab coder (build failed)
When I create a MATLAB Coder Project and try to convert this function: ------------------------- function y = myResampler(x,m,n) %#codegen fsVec = [8000 16000 32000 48000]; targetFsVec = [8000 16000 32000 48000]; fs = fsVec(m); targetFs = targetFsVec(n); y = resample(x,targetFs,fs); ------------------------- to C-code I get a build error saying: coder -build resamplerproj.prj ??? The upsample factor P must be constant. Error in ==> myResampler Line: 12 Column: 5 Code generation failed: Open error report. But I want to be able to resample x using a variable P/Q ratio. Is this just a limitation of Matlab Coder or am I doing something wrong?? John wrote: > When I create a MATLAB Coder Project and try to convert this function: > > ------------------------- > function y = myResampler(x,m,n) %#codegen > > fsVec = [8000 16000 32000 48000]; > targetFsVec = [8000 16000 32000 48000]; > > fs = fsVec(m); > targetFs = targetFsVec(n); > > y = resample(x,targetFs,fs); > ------------------------- > > to C-code I get a build error saying: > > coder -build resamplerproj.prj ??? The upsample factor P must be > constant. Error in ==> myResampler Line: 12 Column: 5 Code generation > failed: Open error report. > > > > But I want to be able to resample x using a variable P/Q ratio. > > Is this just a limitation of Matlab Coder or am I doing something wrong?? Apparently it's a limitation of RESAMPLE ...

Make your own MATLAB toolbox
Hi there, I have a lot of MATLAB functions and I would like to let other use them. They must be able to read the documentation to each function via the help browser if possible. How must be documentation be written (MATLAB comments or html) and where to place the files them? Can the toolbox be "permanently installed" in the help browser? Thanks "Rasmus" <prof.rasmusolesen@gmail.com> wrote in message news:hiq7dk\$sn6\$1@fred.mathworks.com... > Hi there, > > I have a lot of MATLAB functions and I would like to let other use them. > They must be able to read the documentation to each function via the help > browser if possible. How must be documentation be written (MATLAB comments > or html) and where to place the files them? Can the toolbox be > "permanently installed" in the help browser? Thanks If you're using the most recent version of MATLAB, there are instructions in the documentation: http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f4-49752.html If you're using an older version, look in the documentation included in your installation to check if there's a corresponding instance of that page with instructions for that version. I'm not certain exactly when those instructions were first included in the documentation. -- Steve Lord slord@mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ I've had a look at the documentation a...

Maple To Matlab Help
Hi, I am working on a code in Maple but am having trouble with its size. I was hoping to try to run it in Matlab to see if it would do better. I have only ever used matlab for very simple things and was looking for a little direction on how to translate this. Posted is a small section of what I am trying to do. The vector Mat2 is a filled with number 1 through 10. I want to run a specific if/else routine for each number in Mat2, and fill in a matrix Mat3 as my output, which will be 4708 by 4708. The code runs does the entire array Mat2, and each time it encounters a 3 it creates a row in Mat3 with the values assigned. The output will mostly be zeros with 5 separate diagnols. I tried to translate directly, but keep on getting errors. Any help is appreciated. Thanks > Mat2 := Reshape(Mat, 4708, 1); > t := proc (i, j) if Mat2(i) = 3 then if i = j then -4 elif j = i+1 or j = i-1 or j = i+216 or j = i-216 then 1 else 0 end if else 0 end if end proc; Mat3 := Matrix(4708, t, storage = sparse); ...

Matlab Toolboxes used
After code has been written, Is there a way to check which toolboxes have been used? I receive p-code to run on my system from academics who have access to all toolboxes. Thank-you ...

Web resources about - Digits of Accuracy: Maple Toolbox for Matlab - comp.soft-sys.matlab

Resources last updated: 3/31/2016 6:53:15 AM