Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Sample Simulink Program #11

Closed
xmarkalex opened this issue Mar 24, 2017 · 2 comments
Closed

Write Sample Simulink Program #11

xmarkalex opened this issue Mar 24, 2017 · 2 comments
Assignees

Comments

@xmarkalex
Copy link
Owner

Should be able to:

  • read a variable from the matlab workspace
  • Apply some sort of function to it
  • Output a result
@xmarkalex xmarkalex self-assigned this Mar 24, 2017
@sebowers
Copy link
Collaborator

sebowers commented Apr 6, 2017

Small piece of code written to read in an excel file. The code multiples the first column of the Excel file by 2 and the second column divides the numbers by 2. The results are then outputted to a text document.

output.txt

CISC475Test.xlsx

data = xlsread('CISC475Test.xlsx') firstColumn = data(:,1) secondColumn = data(:,2) newfirstcolumn = firstColumn*2; newsecondcolumn = secondColumn/2; output = fopen('output.txt','w'); fprintf(output,'%6.2f %12.8f\n',newfirstcolumn); fprintf(output,'%6.2f %12.8f\n',newsecondcolumn); fclose(output); type output.txt

@sebowers sebowers closed this as completed Apr 6, 2017
@xmarkalex
Copy link
Owner Author

https://github.com/maraco51693/CP-FES-Cycling-/tree/master/Tests/Sample%20Simulink

reads srm_raw data
displays the data point in its respective time up to 14819 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants