How to Use imported Workspace Data in MATLAB script
3 views (last 30 days)
Show older comments
GettinStarted
on 11 Sep 2020
Answered: Cris LaPierre
on 11 Sep 2020
Hello,
I have imported from Excel 4 Matrix coeffients (TA_11, TA_12, TA_21, TA_22 all complex doubles) which exist in the workspace, but are not defined as variables or functions in the script where I want to use them.
Now I want to define a Matrix (2x2) called TA = [TA_11 TA_12; TA_21 TA_22], in order to calculate with this Matrix, i.e. multiplication with other matrices.
This is the error message:
Unrecognized function or variable 'TA_11'.
Error in Script (line 66)
TA = [TA_11 TA_12; TA_21 TA_22];
What is to do here?
Thank you very much.
1 Comment
Accepted Answer
Cris LaPierre
on 11 Sep 2020
You need to refer to them using their variable name. This is the name used in the Workspace. It was set (intentionally or not) when you imported the data.
0 Comments
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!