illegal121
Member level 2
hello There...
I want real time data view on Simulink ..
here is my code
this takes line from a text file , I am just stuck that how do I update Base workspace as the loop is running ...
When I ran this it shows a variable A on workspace after the loop finishes means only last value the file reads..
But I want to read all values from file for workspace in order to interface through "from Workspace " block with simulink ...
Hope you people Helps Me Out...
Thanks A Tons ...
I want real time data view on Simulink ..
here is my code
Code:
fid=fopen('file.txt');
fseek(fid,94,'bof')
n=0;
for (n=0:6)
pause(0.5);
A = fgetl(fid)
A=str2num(A)
end
fclose(fid);
this takes line from a text file , I am just stuck that how do I update Base workspace as the loop is running ...
When I ran this it shows a variable A on workspace after the loop finishes means only last value the file reads..
But I want to read all values from file for workspace in order to interface through "from Workspace " block with simulink ...
Hope you people Helps Me Out...
Thanks A Tons ...