MATLAB: HELP! MATLAB GUI and Simulink interaction

MATLABmatlab gui simulinksimulink

Hello, I'm currently studying for my final exam, for which I have to deliver tomorrow a simulink model linked to a matlab gui. The GUI is used to insert constants in the simulink model. The model represents a Guidance Navigation and Control, used for missiles. It is possible to choose between 4 types of guidances.
When I start to run the GUI m-file, I keep getting an error like this:
??? Error using ==> gui>run_Callback at 694
Error due to multiple causes.
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> gui at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)gui('run_Callback',hObject,eventdata,guidata(hObject))
Caused by:
Error using ==> gui>run_Callback at 694
Error in port widths or dimensions. Output port 1 of 'MultipleGuidance_night/GUIDA/Beam Rider/Div1' has 1807
elements. This port does not accept the dimensions (or orientation) specified by the output signal
Error using ==> gui>run_Callback at 694
Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of
'MultipleGuidance_night/GUIDA/Beam Rider/FILTRO SCARTOM2'
The command window prints all the constants taken from the GUI, but there are some dimension errors when passing them to the simulink model.
This is the link to the files (.mdl, .m and .fig): http://www.megaupload.com/?d=NDSL7PDB
I'm desperately looking for someone more expert than me that can figure out what to do, since I've been struggling with this error for weeks.
Thanks a lot! Who is gonna give a proper answer, will be invited to visit Rome! 😉
Greetings from Italy.

Best Answer

Follow the error message: it points you to the block 'MultipleGuidance_night/GUIDA/Beam Rider/FILTRO SCARTOM2'. If you look in the model, you'll see that this is a transfer function block and the input to the block is of dimension 1573. However, if you look at the documentation for the block, you'll see that "he block can model single-input single-output (SISO) and single-input multiple output (SIMO) systems". In other words, what you're doing is not allowed. Fix the model and make sure that this block is only fed with a signal of dimension 1.
HTH,
Arnaud