当前位置:网站首页>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'表示导入的数据从第三行开始写入边栏推荐
- The difference between character array and string
- Volatile principle
- Configure CX Oracle solution (cx_oracle.databaseerror) dpi-1047: cannot locate a 64 bit Oracle client library: "th
- Jds-12 time relay
- Grpc protocol buffer
- Knowledge payment open source system
- 一文看懂CRMEB开源在线教育知知识付费系统
- Ffmpeg notes
- Table lock query and unlocking in SQL development part 1
- ECCV 2022 | SSP: 自支持匹配的小样本任务新思想
猜你喜欢
随机推荐
21、电文处理任务定义
堆操作
Dj-131/60c voltage relay
Principle and configuration of MPLS LDP
4、主程序和累积中断处理例程实现代码
Execution process of SQL statement
How many of the top ten test tools in 2022 do you master
DataTables warning: table id=campaigntable - cannot reinitialize datatable. solve
How to write a JMeter script common to the test team
The difference between character array and string
迟来的2021年终总结
Leetcode - random set, longest multiclass subsequence
Pycharm - output exception of program run and default comment of added function
What are the functions to be added in crmeb pro2.2?
软件测试的流程规范有哪些?具体要怎么做?
Summary of common redis commands (self provided)
电压继电器DY-28C
配置cx-oracle 解决(cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: “Th
Five connection modes of QT signal and slot
Hjs-de1/2 time relay







