- 博客(4)
- 收藏
- 关注
转载 matlab sum函数
sum函数用法:a = sum(x); 列求和,生成行向量a = sum(x, 1); 列求和,生成行向量a = sum(x, 2); 行求和,生成列向量a = sum(x(:)); 矩阵内所有元素求和,生成一个值>> x = [1,2,3;4,5,6;7,8,9]x = 1 2 3 4 5 6 7 8 9>> a = sum(x)a = 12 ...
2022-05-04 20:22:47 1028
原创 matlab 拉曼光谱 2020.4.11
% close all;% clear;clc;% data = load('C:\Users\图书馆\Desktop\sys_raman\my\1-1.txt');% x = data(:,1);% y = data(:,2);% plot(x,y)% 多行注释 ctrl+R% 取消注释 ctrl+T%读取该目录下的所有txt文件% 读取后file_list 的属性有% name -- file_name %通过字符串拼接,获取绝对路径可以直接用[],也可以用strcat()函.
2022-04-11 21:05:35 952
原创 matlab txt文件顺序读取
%读取该目录下的所有txt文件% 读取后file_list 的属性有% name -- file_name %通过字符串拼接,获取绝对路径可以直接用[],也可以用strcat()函数clear;clc;path = 'C:\Users\图书馆\Desktop\sys_raman\my\第一组\';file_list = dir([path,'*.txt']);file_name = sort({file_list.name});len = length(file_list);fil...
2022-04-11 20:29:56 719
原创 matlab中 linspace , plot,legend ,label
linspacelinspace - 生成线性间距向量 默认返回包含 x1 和 x2 之间的 100 个等间距点的行向量。 y = linspace(x1,x2) y = linspace(x1,x2,n)plot>> x = [2,5,7];>> y = [3,4,5];>> plot(x,y)先画对应点,默认以直线连接...
2021-10-08 20:48:10 458
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人