Matlab Variables do not Propagate to C-Function Call Block

Post Reply
malife
Expert
Posts: 56
Joined: Tue Apr 17, 2007 7:24 am
Location: Santa Cruz, CA
Contact:

Matlab Variables do not Propagate to C-Function Call Block

Post by malife » Fri Aug 22, 2008 5:38 pm

Hello Lubin,
I am currently working on 0.98d so maybe you already fixed that in the latest version (which I hope you'll send it to me when you get back from vacations :-) )

But the issue is the following. I have a matlab script that initializes different variables most of it related to sizes and locations of signals. For instance I have a MAX_POSSIBLE variable that determines the maximum amount of bytes I can receive between sample times in the interrupt driven UART. If I configure that value using the variable (instead of just the number) in the C-function call dialog, for instance, for the input size. It will not recognize it; furthermore if I try to compile it says that it can not convert "" to an integer.

Hope this is a simple one to fix. Certainly it is not a show-stopper since I can just put the number manually, but it is convenient that if I change something (like baud rate) all the sizes get reconfigured by reading those variables.

Thanks!

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: Matlab Variables do not Propagate to C-Function Call Block

Post by LubinKerhuel » Fri Aug 22, 2008 11:29 pm

Ok, Will have a look on that.
Thanks for the bug report !
Lubin

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: Matlab Variables do not Propagate to C-Function Call Block

Post by LubinKerhuel » Tue Sep 02, 2008 8:03 pm

Hi Mariano,
It seems to be quite complicated to modify the blockset.

Anyway, there may be a way to do what you wants :
replace : YoutVariable by ['[' num2str(YourVariable) ']'] in the dialog box.
I should work for all blocks.

Lubin

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests