How do I get a table calculation result in a single column?
Show older comments
Hi,
I'm trying to do an excel calculation in matlab but unsure how, I have these a b c variables in this sheet

and I'm just trying to do the CED calculation in matlab instead of in excel, the equation is simply:
(10^(a-(b/(c+T)))*133.322)^0.5
right now i'm reading my files as
T = readtable('C:\Users\Andrew Martin\Documents\PIP2.xlsx','NumHeaderLines',1);
T.Properties.VariableNames(1:10)={'Element','Num','E0','r','CED','Pvap','Tm','a','b','c'};
head(T)
ix=(T.Num>=12)&(T.Num<=35);
Tmp = 500;
cCED = ((10^(T.a(ix)-(T.b(ix)/(Tmp+T.c(ix)))))*133.322)^0.5;
but the result is giving me a 16x16 complex double instead of creating a single column of the calculated data based on the ix I selected.
My goal is trying so that I can input any different T (my variable) to get different CED values for each element.
Please help, thanks! Sorry I'm a coding noob.
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!