Matlab R2013a Invalid field name 'NumConStates'
I created a model in Matlab R2011a Simulink and it was working fine but now when i want to open it in Matlab R2013a Simulink I have this error.
Error in 'wahadlo/Subsystem/SFunction' while executing MATLAB Sfunction 'wahadlo_sfun', flag = 0 (initialize), at start of simulation.
Caused by:
Invalid field name 'NumConStates'.
I could't find any solution to this problem. Here's my Simulink Model
See also questions close to this topic

"Workspace" display in Matlab window doesn't change after `dbup`
When an error occurs after
dbstop if error
, I found the program counter (green arrow pointing at the code in the*.m
file) to be pointing in a deeply nested Table method. Way too low for my preference. I issueddbup
to get back up to my method, which is responsible for the error. However, the Workspace display area doesn't change to show the variables in thedbup
'd scope. I tried rightclick andRefresh
. I tried closing the Workspace display area and reopening it. I often see this behaviour, and I wonder if the Workspace display area is even suppose to react in real time during debugging.Should the Workspace display area reflect the current scope, as changed via dbup? How can I force it to?

Matlab error using filtfilt() 'Data length must be larger than 18 samples."
I'm making a neural network that works with wavelets but I have got the following error:
Error using filtfilt>getCoeffsAndInitialConditions (line 182) Data length must be larger than 18 samples.
Error in filtfilt (line 97) [b,a,zi,nfact,L] = getCoeffsAndInitialConditions(b,a,Npts);
Error in decimate (line 136) odata = filtfilt(b,a,idata);
Error in ENGNeuralNetwork (line 56) decdatae(ch,trial,:)=squeeze(decimate(cD1(ch,trial,:),32));
I am a bit confused about what I should be changing, as I'm sure these are all related errors. This is the code that it is referring to for line 56:
for ch=1:2 for trial=1:10 decdatae(ch,trial,:)=squeeze(decimate(cD1(ch,trial,:),32)); end end
and this is the code for line 97:
for runs=1:10 % Create a neural net with 100 hidden neurons net=newff(P,T,1000,{'tansig','logsig'},'traingdx'); net.TrainParam.epochs=1000; net.TrainParam.goal=0.04; net.TrainParam.min_grad=1e20; %line 97 net.TrainParam.show=3000; net.divideParam.trainRatio=0.6; net.divideParam.valRatio=0; net.divideParam.testRatio=0.4;
I'd be grateful if anyone could give me a heads up of how to sort this.
Thanks

Matlab s2p file
I'm trying to build a s2p file in simulink using the block "To File" but gives me an odd file with random characters like
Which looks like when I try to open a jpeg file with block note. I'm trying a simple RF layout with a single resistive divider and the input and output ports like in figure
anyone knows what is happening here?

Embedding my matlab m functions in Simulink
We have developed a set of matlab functions that have been tested (basically event detectors whose inputs are bio signals, thus time series).
We now want to do Simulink simulation usingĀ« these m files whose input will be the mentioned biosignals time series.
What would be the simplest way to do this , having in mind that each mentioned m file has about 2000 code lines and has a certain degree of complexity (wavelets etc).
Many thanks in advance

Calcaluting FER and BER
I need to draw FER and BER curves ( FER and BER vs SNR curves) for the Bluetooth communication system shown here. The problem is that when I try to plot it using
bertool
by varying the EB/No from 0 till 20 dB , I get an empty plot. Also the model outputs the BER and FER in values greater than one (please view the output variables FER1 , FER2 , ACL_BER and all related variables for the BER), which as we know they must be less than one . So please I need to know how to plot these two curves using this model. Thanks in advance. EDIT : Someone has generated FER and BER from this model :So how did he done that ?