MatLab does not reads Excel sheet properly
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MINATI PATRA
le 12 Fév 2024
Commenté : MINATI PATRA
le 13 Fév 2024
status = mkdir('D:\PK90'); cd D:\PK90
filename = 'sample111.xlsx'; T = readtable(filename);
P = 2*T.A + 3*T.B + 4*T.C + 5*T.D + 6*T.E
%% When running the Excel sheet, I want MatLab to read the values of all the parameters as varies in the sheet downward. When one parameter varies other values will be considered from first row.
4 commentaires
Réponse acceptée
Cris LaPierre
le 13 Fév 2024
Déplacé(e) : Cris LaPierre
le 13 Fév 2024
readtable just loads the data as is. You will still need to write code to perform any manipulation to the data. Perhaps fillmissing does what you want?
d=readtable("sample111.xlsx")
% replace NaNs with previous value
d = fillmissing(d,"previous")
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!