I have one Simulink model that can be used for two separate projects whose only difference is the data input to them. My question is: is there a way within one Simulink model to select different data files to read when triggered by the appropriate flag?
For a simplified example, let's say I have a project A and a project B with identical Simulink logic.
The data corresponding to project A (A_data.m) looks something like:
C1 = 100;
C2 = 200;
C3 = 300;
And the data file (B_data.m) for project B looks like:
C1 = 10;
C2 = 20;
C3 = 30;
Is there a way within a single Simulink model to pick between these data files using the project A or project B name plate as a trigger?
I'm thinking something along the lines of possibly a switch block at the top level of the Simulink model that uses project A or B as the switch and runs the corresponding data file. Or if within sub blocks you can assign different, specific data files to each sub block with a switch triggering which sub block to enter, A or B, however I do not know how I could execute either of these ideas.
Thank you for your suggestions.