Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

problem in using xlswrite command

조회 수: 1 (최근 30일)
Jahnavi Bathala
Jahnavi Bathala 2019년 1월 21일
마감: MATLAB Answer Bot 2021년 8월 20일
I tried to write 218393*2 cell array named x into a excel sheet using the following code
[y,fs]=audioread('C:\Users\jahnavi bathala\Desktop\4th year project\trimmed data\aaaa samples\aaa (1).wav');
[cA,cD] = dwt2(y,'haar');
cA={num2cell([cA])};
cD={num2cell([cD])};
X=[{'cA','cD'};cA{1},cD{1}];
xlswrite('cA',X,'A1');
but it was only able to create x cell array but not able to write it into the excel sheet named cA. I also tried cA.xlsx and giving path file but it didn,t workout.
thank you.
  댓글 수: 3
Steven Lord
Steven Lord 2019년 1월 21일
not able to write it into the excel sheet named cA
Can you clarify what happened when you tried? Did MATLAB throw an error or issue a warning? If so, please post the full text of the error or warning message (everything in red or orange.) Did it not write all of your data? Did it do something else entirely (and if so, can you describe in detail what it did do?)
Jahnavi Bathala
Jahnavi Bathala 2019년 1월 22일
It is not showing any error at the same it is not copying those values into excel sheet.
In command window its just displaying
>> cA
cA =
1×1 cell array
{218397×1 cell}

답변 (1개)

Image Analyst
Image Analyst 2019년 1월 21일
Try entering in the sheet before the cell reference:
filename = fullfile(pwd, 'cA.xlsx');
sheet = 1;
cellReference = 'A1';
xlswrite(filename, X, sheet, cellReference);
  댓글 수: 1
Jahnavi Bathala
Jahnavi Bathala 2019년 1월 22일
I got the same response as before by applying your changes. It is not showing any error at the same it is not copying those values into excel sheet.
In command window its just displaying
>> cA
cA =
1×1 cell array
{218397×1 cell}

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by