Help on exporting equations from matlab to excel (Not Values, Actual excel equations)
1 次查看(过去 30 天)
显示 更早的评论
So just like the title im trying to export equations written in matlab to excel. This is my code.
Letters=char('A'+(1:26)-1)';
plus='+';
equal='=';
s1={'1';'2';'3';'4';'5';'6';};
Threshold=2;
for (xx=1:3)
eq1(xx)=strcat(equal,Letters((1+Threshold)),s1(xx),plus,Letters((2+Threshold)),s1(xx));
end
eq1=eq1';
T=table(eq1);
writetable(T,'TestA.xlsx','Range','F5')
Basically what this code does is to put a string repsrenting an equation together.Then a for loop is used for how many rows in 1 column.This is then exported to excel to be equations.
This code works for simple equations.However, if functions is long and depends on different factors or huge for loops then this code will not be viable nor simple to make. Is there an easier or simpler way to create those equations then export them to excel?
Thanks in advance,
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!