Error while obtaining sizes from MEX S-function 'forward' in block 'dummy/Dynamic_Model/S-Function'. MATLAB error message:.
Hi to everybody,
I created the file forward.dll using the command:
mex -DWIN32 -output forward model_d.c model_s.c sdlib.c assigns.c contact.c
derivs.c gmc.c impact.c inits.c invert.c lcp_solver.c lmdif_c.c mathtools.c
object.c output.c pipetools.c readmuscles.c readtools.c sdfor.c
spring_based.c wrapping.c gcvspl.c user_def.lib forward.lib acpp.lib
qhull.lib solid.lib wrap.lib
I need to run the command:
name','forward','parameters',',,,,,,[1 0 0 0 20],');
...'Matlab Code' to 'Embedded Matlab fun code'
I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simulink and I want to use it in 'Embedded Matlab fun block' so i need to transform 'Matlab code' to 'Embedded Matlab fun code' to perform the task.
The Matlab code is as follows:
u_abs = abs(u);
major_th = 1.5e-1;
minor_th = 1.8e-2;
major_peak_value = ;
minor_peak_value = ;
pos = 1;
pos_max = 1;
[m pos_max(end+1)] = max( u_abs( pos : pos + 10) );
pos...Matlab 'mfilt.cicdecim' and 'filter' functions
I am trying to see the response of a CIC filter for a set of input data.
I created the filter using the function
Hd = mfilt.cicdecim(100, 1, 3)
'InputWordLength', 3, ...
'InputFracLength', 0, ...
I have some signed data in decimal in an input array 'x'. If I do,
y = filter(Hd, x)
1. I am getting all zeros in y
2. y is not the form of a vector, but has other data in it.
I am puzzled on why y has all zeros? Can somebody help?
...Performance of Matlab 'zip' and 'unzip' functions
I'm using matlab 6.5 and I just realized that it comes with zip and
unzip functions. On the first try it seems that the matlab zip
functions are slower than other commonly available programs e.g.
Anyone has any reliable data about the performance of Matlab zip and
unzip functions? Failing that, personal experience is good too.
Terence Leong wrote:
> I'm using matlab 6.5 and I just realized that it comes with zip and
> unzip functions. On the first try it seems that the matlab zip
> functions are slower than other commonly available programs ...A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ?
(defun enigma (x)
(and (not (null x))
(or (null (car x))
(enigma (cdr x)))))
"I suppose I should learn Lisp, but it seems so foreign."
- Paul Graham, Nov 1983
On Wed, Oct 07 2015, CAI GENGYANG wrote:
> What's this ?
> (defun enigma (x)
> (and (not (null x))
> (or (null (car x))
> (enigma (cdr x)))))
Bad taste? It returns T if the list X contains nil as an element. It
would be clearer to write (some #'null x).
CAI GENGYANG ...'^=' and '~='?
What is the difference between '^=' and '~='?
...calling '!' or 'system' in matlab different than same functions from shell
When I am in the shell (tcsh) on my Mac (outside Matlab), I am able to
use the command line utility ncdump to read netcdf format files
ncdump -h testfile.nc
However, in Matlab, the same command preceded by the '!' (or using
'system') generates an error:
>> !ncdump -h test.nc
dyld: Library not loaded: /opt/local/lib/libnetcdf.7.dylib
Referenced from: /opt/local/bin/ncdump
Reason: Incompatible library version: ncdump requires version 10.0.0
or later, but libnetcdf.7.dylib provides version ...i wonder result's difference between 'solve function' and 'circcirc function'
i calculate intersection point between two circles.
first way, i used solve function.
second way, i used circcirc function.
By the way two way result is similar.
but, The result is the same five-digit decimal.
i wonder result's difference between 'solve function' and 'circcirc function'
five-digit decimal. >> five decimal places
On 7/11/14 7:03 AM, 김영재 wrote:
> i wonder result's difference between 'solve function' and 'circcirc function'
solve is much more general. Try finding the intersections between y=x^3
and y=9*x us...Error? s = assignin('base','s',tf('s'));
I need a little help here. Could anyone please tell me what is wrong
with this command?
s = assignin('base','s',tf('s'));
The matlab syntax is -- assignin(ws, 'var', val)
Basically I just want to add s=tf('s') into the base workspace.
"Jack" <Jack@Jill.com> wrote in message
> I need a little help here. Could anyone please tell me what is wrong
> with this command?
> s = assignin('base','s',tf('s'));
> The matlab syntax is -- assignin(ws, 'var', val)
> Basically I just want to add s=tf('s') into the base workspace.
What does the error message say? Something about too many output arguments,
right? How many output arguments does the documentation for ASSIGNIN show
that it should return? How many are you asking it to return?
...A question about 'class' and 'set' at MATLAB
In my project,an error stop my step.Need help!......About class and set value.
%Create a class D:
D.value = 1;
D = class(D,'model');
%Create a class C:
C.value = 2;
C.submodel = D;
C = class(C,'model');
%Create a class B:
B.value = 3;
B.submodel = C;
B = class(B,'model');
%Create a class A:
A.value = 4;
A.submodel = B;
A = class(A,'model');
Now I wanna set D.value = 0, what can I do for that ?
A.B.C.D.value ? no,maybe MATLAB is not power enough for this ?
t.Michael Chan wrote:
&...Matlab BUG??? what's wrong with Matlab's "fmincon"?
I've set the lower bound for my parameter x to be 1e-7, and the upper bound
for my parameter x to be 3,
that's to say, it everything is correct, x should be within the range of
but then in my optimization objective function,
I have a "log" function, involving log(x),
I've checked, it gave me a complexe number,
that's because Matlab "fmincon" still put x= -1.2547e-008,
despite the fact that negative x is not allowed...
What's wrong with Matlab's "fmincon"?
It is difficult to know the answer to your question without se...'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers,
I am trying to run an append/update query from code, a command button
on a form initiates the queries.
the format i am using is;
UPDATE/APPEND "field selections"
RecordSource "qryExample" = above text strings"
When i am running a SELECT query in this manner it works fine with no
problems, and accepts the values of specified linked for...gmdistribution.fit ERROR: Method 'fit' is not defined for class 'gmdistribution' or is removed from MATLAB's search path
I have to use a specific program that contains those rows:
>S = struct('mu',mu,'Sigma',sigma,'PComponents',p);
>options = statset('Display','final','MaxIter', 9000);
>object =gmdistribution.fit(X,NGauss,'Options', options,'Start',S);
but when I launch the program it returns this error:
>Error using gmdistribution.fit
>Method 'fit' is not defined for class 'gmdistribution' or is removed from MATLAB's search path.
>Error in val (line 149)
>object =gmdistribution.fit(X,NGauss,'Options', options,'Start',S);
Into the folder "toolbox/stats/stas" there is the "@gmdistribution" directory, but if I try to create a new path it returns:
>you cannot add method folders(ones that starts with '@'). or private folders to your Matlab search path.
Moreover if i type "gmdistribution" on the command window it returns:
DistName: 'gaussian mixture distribution'
PComponents: [0x1 double]
Methods for class gmdistribution:
when im trying to load a .wav file as ascii, im getting following error , can anybody resolve it???????
??? Error using ==> load
Unknown text on line number 1 of ASCII file C:\Users\Lubna\matlab\2_1.wav
"ABC " <email@example.com> wrote in message <firstname.lastname@example.org>...
> when im trying to load a .wav file as ascii, im getting following error , can anybody resolve it???????
> s=load('C:\Users\Lubna\matlab\2_1.wav', '-ascii')
&...There's 'new' but no 'delete'
If I use: "myobject = new MyObject" do I just delete it with "myobject =
nil"? There's no "delete", how do I free any memory used within myobject?
On 15.04.2005 05:35 Mat, in email@example.com,
�pf� <paulfredlein@NOSPAMoptusnet.com.au> wrote:
> If I use: "myobject = new MyObject" do I just delete it with "myobject =
> nil"? There's no "delete", how do I free any memory used within myobject?
...'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Thanks for ur help there HJ.
I know how to do the tasks you specified there.
I would like for the update query to use field values from some of the
fields on the form (frmInvoices) such as InvoiceNumber, DateFrom,
DateTo. My problem is that an append/update query can't find the
values in the open Form (frmInvoices) when I specify them as;
a select query has no problem finding the field values on a form.
Could you post the entire code that you are having trouble with? Now it is
not possible to see what goes wrong.
"Aaron" <firstname.lastname@example.org> wrote in message
> Thanks for ur help there HJ.
> I know how to do the tasks you specified there.
> I would like for the update query to use field values from some of the
> fields on the form (frmInvoices) such as InvoiceNumber, DateFrom,
> DateTo. My problem is that an append/update query can't find the
> values in the open Form (frmInvoices) when I specify them as;
> a select query has no problem finding the field values on a form.
> please help.
First off, if you are not always using all the parameters specified in
your form, then you have to add parameters to your query on the fly.
Also, you can't just do something like
qdf.SQL = "SE...if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
I'm just curious if it ever dawned on anybody how to abbreviate this
if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in
Clinical Programmer Analyst
678 336 4328
no brain no pain
if not (str_mo in ('','.') or str_da in ('','.') or str_yy in
if not (missing(str_mo) or missing(str_da) or missing(str_yy))
On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...'printsys' and 'step' in matlab 6.5
this is my code:
M = 1;
b = 10;
k = 20;
den=[M b k];
how come the 'printsys' and 'step' will generate errors and cannot be
used in matlab 6.5?
No errors on my system.
Have you tried an unistall/re-install?
"Fang Jun" <email@example.com> schreef in bericht
| this is my code:
| M = 1;
| b = 10;
| k = 20;
| den=[M b k];
| how come the 'printsys' and 'step' wil...Problem with 'sys' & 'frd' function
Im trying to get the Time-Domain Impulse Response from Freq Domain.
For the same am using the frd & sys functions.
Problems while using the same:
1) >> sys = frd(resp,freq,'Hz');
??? Error using ==> lti.set
Property/value pairs must come in even number.
Am using the format given in Help,whats the problem?
2) > impulse(sys)
??? Error using ==> rfinputs
Not supported for Frequency Response Data models.
Says no support. Can someone clarify more on this?
Hope will get some inputs.
The syntax should be
>> sys = frd(resp,...Why 1st order PDE's are not 'proper' for MATLAB?
I have a first order 1-D PDE problem of thte form:
I was looking at the former discussions on this topic. Almost all the
people posting this problem got the following error:
?? Error using ==>
This DAE appears to be of index greater than 1.
In most of the replies it was stated that pdepe is not suitable for
solving first order PDE's. Moreover, the PDE toolbox of the MATLAB
also does seem to handle only second order PDE's as well.
After writing these observations, I want to as...What's the meaning of 'assert' and 'deassert' ?
On 2006-11-21, =?gb2312?B?yb3WruGw?= <firstname.lastname@example.org> wrote:
Given the copious context you've provided, this is just a guess:
assert: set a signal to its "active" state.
deassert: set a signal to its "inactive state.
If a signal is active-low, "asserting" that signal means
setting it low and deasserting it means setting it high.
Grant Edwards grante Yow! BARBARA STANWYCK
at makes me nervous!!
visi.com ...What's the difference between 'close' and 'delete'?
As you know, close(h) and delete(h) both methods can close figure
window, when h is a handle of a figure. What's the difference between
the two methods?
"Damayi" <email@example.com> wrote in message
> Dear all
> As you know, close(h) and delete(h) both methods can close figure
> window, when h is a handle of a figure. What's the difference between
> the two methods?
CLOSE calls the function specified in the CloseRequestFcn property of the
...What's the difference between 'upfirdn' and 'conv' ?
Hello to everyone,
I try to figure out what's the difference between upfirdn and conv regarding the convolution operation.
I pass a signal through a bank filter 32-channel filter bank. I have two method for computing the output signal at the analysis filter bank.
I can use the upfirdn command like this :
H_analysis is my analysis filter bank.
Otherwise I can compute the output signal like this :
It should be the same operation, but why do I have different le...Scilab's 'optim' and 'splin'
I've got this really cool application that makes a smoothed line using
splines, then fits it to a source line using a nonlinear weighting. I'm
currently using SciLab with it's 'optim' and 'splin' function to do
this, but now I need to write some embeddable C++ code.
The 'splin' function is obvious -- it generates a spline from a number
of inflection points. The 'optim' function as I am using it uses a
quasi-Newton method, which is working just fine for me.
Before I go and write this stuff up by hand, does anyone have any
suggestions on wher...