学习笔记
文章平均质量分 56
sububu
这个作者很懒,什么都没留下…
展开
-
python读取txt转为csv
data.txt 文本内容如如下:2021-04-04 10:37:09 Sum 293 ValidNumber_S 1 ValidNumber_L 812021-04-04 10:37:17 Sum 312 ValidNumber_S 1 ValidNumber_L 642021-04-04 10:37:27 Sum 659 ValidNumber_S 3 ValidNumber_L 1102021-04-04 10:37:37 Sum 394 ValidNumber_S 5 ValidNumb原创 2021-04-04 17:09:28 · 671 阅读 · 1 评论 -
legend自动标注
%自动标注多个曲线j=0;for i = 2700:10:2900j=j+1;str{j} = char([‘频率’,num2str(i),‘MHz’]);endplot(rand(j,j))%标注在坐标轴右边,去边框,设置字号h1=legend(str,‘location’,‘eastoutside’,‘Box’,‘off’,‘fontsize’,7);...原创 2020-06-21 00:15:27 · 293 阅读 · 0 评论 -
计算两个经纬度间距离和角度 matlab
%x=[E1,N1];y[E2,N2])经度 ,纬度function [distance,deg] = Spherediff(x,y,R)if nargin < 3R = 6378137; %地球半径endx = deg2rad(x); %度转弧度y = deg2rad(y);DeltaS = acos(cos(x(2))*cos(y(2))*cos(x(1)-y(1))+sin(x(2))*sin(y(2)));distance = R * DeltaS; %米DeltaA = a原创 2020-06-12 19:16:29 · 6433 阅读 · 1 评论 -
matlab读取含字符串和数字的txt文档
使用textread函数读取TXT文本,涉及使用分隔符,读取字符串后的数字,读取指定列。示例1:text.txt中内容如下:Num:3,Channel:A,Apm:200,Num:4,Channel:A,Apm:210,Num:5,Channel:B,Apm:220,使用语句:filename=‘C:\Users\user\Desktop\text.txt’;[Num,Channel,Apm]=textread(filename,‘Num:%dChannel:%sApm:%d’,‘delimi原创 2020-06-10 22:56:25 · 9481 阅读 · 0 评论