How to store input and output arguments in a matrix form so that it can be exported to EXCEL?
1 view (last 30 days)
Show older comments
Hello everyone, I have a function that gets 8 inputs and returns 8 outputs. I want to store all these arguments and intermediate results in a matrix and export them to EXCEL sheet. I got the syntax for text but could not store the arguments (numbers) in matrix.
function [a, b, c, d, e, f, g, h] = ConcWtXls (R, S, T, U, V, W, X, Y)
%main code goes on here
A{1,1} = 'Text1';
A{1,2} = 'Input';
A{1,3} = 'Intermediate Result';
A{1,4} = 'Output';
A{2,1} = 'Text2';
A(2,2) = '%.4f', R;
A(2,3) = '%.4f', iv;
A(2,4) = '%.4f', a;
%similarly the code goes on for remaining inputs and outputs
xlswrite('Samplefile.xls',A);
end
The above piece of code shows error as
Conversion to cell from char is not possible.
Error in ConcWtXls (line 154)
A(2,2) = '%.4f',icNaCl;
The input and output arguments are all numerical values.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Spreadsheets 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!