Brace indexing error maybe complex ?
Show older comments
Hello everyone !
The famous brace indexing. I can't get ride of, i don't see where i do something wrong.
The main structure:
close all;
clearvars;
load Dataset\posture.mat;
signal=datablock1.data;
Fe=1000;
t=0:0.001:10;
%Create excel
Tremor_functions.excel;
%EMG analysis
for mrkr=1:6
Tremor_functions.Timestamp(markers,mrkr,Fe)
for muscle=1:4
Tremor_functions.signal_processing(Debut,Fin,muscle,signal,Fe,mrkr,t);
end
end
%Fill with data
Tremor_functions.fill_excel(folder,Answer)
First i create an excel and i create some column in it
function excel
Prompt={'Surname', 'Name', 'Birthday (xx xx xxxx)','Evaluation (yyyy yy yy)'};
Dlgtitle='Donnees patient';
Def={'John','Doe','01 01 1961','2015 02 16'};
Answer=inputdlg(Prompt,Dlgtitle,1,Def);
Info_patient={Answer{1},Answer{2},Answer{3}};
Eval_date={'Evaluation',Answer{4}};
e= Answer{4};
assignin('base','Answer',e);
Muscle={'Fl_Pr','Ex_Su','Bic','Tri'};
Taches=[1;2;3;4;5;6];
Taches_c={'Taches'};
folder = [Answer{1},' ',Answer{2},' ',num2str(Answer{3})];
assignin('base','folder',folder)
if ~exist(folder, 'dir')
mkdir(folder);
end
filename = 'Info_patient.xlsx';
assignin('base','filename',filename)
fullname = fullfile(folder, filename);
assignin('base','fullname',fullname)
xlswrite(fullfile(folder,Answer{4}),Info_patient,'Fpic','A2');
xlswrite(fullfile(folder,Answer{4}),Eval_date,'Fpic','A3');
xlswrite(fullfile(folder,Answer{4}),Muscle,'Fpic','B4');
xlswrite(fullfile(folder,Answer{4}),Taches,'Fpic','A5');
xlswrite(fullfile(folder,Answer{4}),Taches_c,'Fpic','A4');
end
At the end of my signal processing i have gathered information that i want to put in my excel sheet, i start with that:
function fill_excel(folder,Answer)
xlswrite(fullfile(folder,Answer{4}),Fpic,'Fpic','B5');
end
But when i run it, i have Brace indexing is not supported for variables of this type.
xlswrite(fullfile(folder,Answer{4}),Fpic,'Fpic','B5');
When i don't have something else. I have assigned some of variables, but it doesn't work.
If someone have a clue !
Thanks !
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!