Problem with direct calculation on table with std and “omitnan”
Since R2023a, it is possible to perform calculations directly on tables (and timetables) without extracting their data by indexing.
https://fr.mathworks.com/help/matlab/matlab_prog/direct-calculations-on-tables-and-timetables.html?searchHighlight=table&s_tid=srchtitle_table_9
I want use std directly on a numeric table where I can have nan.
For example :
load patients
T = table(Age,Height,Weight,Systolic,Diastolic)
mean(T,"omitnan")
It’s fine.
But why there is a problem with std(T,"omitnan") ?
% Applying the function ‘std’ to the variable ‘Age’ generated an error.
I can use std(T{:,:},"omitnan") or std(T.Variables,"omitnan") but I lost the possibility to work directly with my table.
Did I miss something ?
Do you have any suggestion ?
Thank you in advance.
SAINTHILLIER Jean MarieSince R2023a, it is possible to perform calculations directly on tables (and timetables) without extracting their data by indexing.
https://fr.mathworks.com/help/matlab/matlab_prog/direct-calculations-on-tables-and-timetables.html?searchHighlight=table&s_tid=srchtitle_table_9
I want use std directly on a numeric table where I can have nan.
For example :
load patients
T = table(Age,Height,Weight,Systolic,Diastolic)
mean(T,"omitnan")
It’s fine.
But why there is a problem with std(T,"omitnan") ?
% Applying the function ‘std’ to the variable ‘Age’ generated an error.
I can use std(T{:,:},"omitnan") or std(T.Variables,"omitnan") but I lost the possibility to work directly with my table.
Did I miss something ?
Do you have any suggestion ?
Thank you in advance.
SAINTHILLIER Jean Marie Since R2023a, it is possible to perform calculations directly on tables (and timetables) without extracting their data by indexing.
https://fr.mathworks.com/help/matlab/matlab_prog/direct-calculations-on-tables-and-timetables.html?searchHighlight=table&s_tid=srchtitle_table_9
I want use std directly on a numeric table where I can have nan.
For example :
load patients
T = table(Age,Height,Weight,Systolic,Diastolic)
mean(T,"omitnan")
It’s fine.
But why there is a problem with std(T,"omitnan") ?
% Applying the function ‘std’ to the variable ‘Age’ generated an error.
I can use std(T{:,:},"omitnan") or std(T.Variables,"omitnan") but I lost the possibility to work directly with my table.
Did I miss something ?
Do you have any suggestion ?
Thank you in advance.
SAINTHILLIER Jean Marie table, std MATLAB Answers — New Questions