当前位置:网站首页>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'表示导入的数据从第三行开始写入边栏推荐
- [jspwiki]jspwiki installation deployment and configuration
- Jogy-61 voltage relay
- Editor in ArcGIS Pro
- Ffmpeg notes
- Vs dynamic library debugging
- [leetcode] 35. Search the insertion position
- sql语句的执行流程
- Leetcode - sliding window extremum, search tree postorder traversal, statistical difference pairs, dividing equal subsets
- Qt信号与槽的五种连接方式
- JDS-12时间继电器
猜你喜欢

ArcGIS Pro 中的编辑器

2022年全球程序员平均薪资发布,中国排名很意外

Introduction to grpc

基于RSocket协议实现客户端与服务端通信

使用Mock技术帮助提升测试效率的小tips,你知道几个?

PMP每日一练 | 考试不迷路-7.28(包含敏捷+多选)

Tencent interview -- please design a thread pool to implement sequential execution

Hjs-de1/2 time relay

Crmeb Standard Version window+phpstudy8 installation tutorial (I)

Ry-d1/1 voltage relay
随机推荐
How many of the top ten test tools in 2022 do you master
JY-7GA/1电压继电器
Crmeb Standard Edition window+phpstudy8 installation tutorial (III)
2021-06-29
Share the HR experience of the first and second tier companies
分享一下一二线大厂HR面经分享
Execution process of SQL statement
Idea debugging burpsuit plug-in
机器学习的3大“疑难杂症”,因果学习是突破口 | 重庆大学刘礼
使用Mock技术帮助提升测试效率的小tips,你知道几个?
7、实时数据备份和实时时钟相关定义
Customer service system attached to crmeb Standard Edition
crmeb v4.3部署流程
[jspwiki]jspwiki installation deployment and configuration
Back compilation failed
Volatile principle
配置cx-oracle 解决(cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: “Th
设置结构体字节对齐
Compilation learning
Shellcode writing learning environment