当前位置:网站首页>MATLAB不覆盖导入EXCEL
MATLAB不覆盖导入EXCEL
2022-07-28 14:33:00 【WHJ226】
matlab中定义了自变量和因变量等变化的参数,每次自变量和因变量更改后,如果不更改导入excel的位置,下一次运行的结果会覆盖掉上一次运行的结果,为解决不覆盖导入excel的问题,本方法仅作为一种简单的参考:
clc;clear;
x=4;%自变量
y1=2*x;%因变量1
y2=3*x;%因变量2
filename = 'D:\lx.xlsx';%文件名称(文件将保存到当前路径,可更改路径)
xlswrite(filename,{'x','y1','y2'},1,'A1');%第一行填写各自变量和因变量的名称
A = {x,y1,y2};%需要导入excel中的自变量和因变量
xlswrite(filename,A,1,'A2');%'A2'表示导入的数据从第二行开始写入
%切记!!!第二次运行matlab时,即自变量数值变化时需要更改数据写入的位置,例如上一次运行写入'A2',下一次写入'A3'.
%例如:
% xlswrite(filename,A,1,'A3');%'A3'表示导入的数据从第三行开始写入边栏推荐
- Multi merchant mall system with relatively clean code
- ECCV 2022 | SSP: 自支持匹配的小样本任务新思想
- Opencv - cut out mask foreground area from grayscale image
- 关闭独立窗口对其他窗口同时关闭的问题
- Understanding of entropy and cross entropy loss function
- 7、实时数据备份和实时时钟相关定义
- Have you ever used the single merchant mall, which is smooth enough to make people feel numb?
- Write a standard character device driver with your hands
- I heard that many merchants of crmeb have added the function of planting grass?
- Chrome plug-in debugging
猜你喜欢
随机推荐
使用Mock技术帮助提升测试效率的小tips,你知道几个?
Table lock query and unlocking in SQL development part 1
Chrome plug-in debugging
Requses template
SRTT-110VDC-4H-C时间继电器
2022年最火的十大测试工具,你掌握了几个
Configure CX Oracle solution (cx_oracle.databaseerror) dpi-1047: cannot locate a 64 bit Oracle client library: "th
Understand crmeb open source online education knowledge payment system
知识付费开源系统
详解.NET的求复杂类型集合的差集、交集、并集
The subst command mirrors a folder to a local disk
Shellcode writing learning environment
Pyinstaller packages py as an EXE file
Opencv - cut out mask foreground area from grayscale image
JOGY-61电压继电器
Summary of common redis commands (self provided)
Gfpgan blurred photo repair artifact
9、相关数据累积任务定义
Vs dynamic library debugging
MIT指出公开预训练模型不能乱用








