当前位置:网站首页>Data filtering of MATLAB
Data filtering of MATLAB
2022-07-25 23:00:00 【kissgoodbye2012】
Matlab Powerful , Here are some data filtering methods , At least let it reach Excel The degree of data filtering
One 、 Take some rows or columns from the multidimensional array and combine them into a new array
Examples are as follows : Take some columns to form a new array
newdata=olddata(:,[1 5 8 2 6]);
Two 、 Filter a row or column of a multidimensional array according to a certain condition , Expand to other rows or columns at the same time
olddata Is a multi row and multi column array .
newdata=olddata(olddata(:,1)==value,:);
3、 ... and 、 Screening method
3.1 Find all elements in a certain range
pf=olddata(olddata(:,1)>=value1&olddata(:,1)<=value2);
tempnum=find(pf<=value1&pf>=value2);
3.2
Four 、 String splicing
newstr=strcat(oldstr,'new text');
Line feed operation : Use braces {} Or use newline As a line break
str=[{
'ueifkdu';'877'}];
chr = 'Whose woods these are I think I know.';
chr = [chr newline 'His house is in the village though']
5、 ... and 、 Import csv file
csvread function ...
Parameters 1: File path ;
Parameters 2: Number of lines to start ( The default from the 0 OK, let's start );
Parameters 3: Number of columns to start ( The default from the 0 Column start ).
data=csvread('121.csv',1,1);
It could be wrong : The first line of Chinese is garbled , Do not read from 0 Just start the line .
6、 ... and 、figure Set up
xlabel('MHz');% Set up X Axis labels
ylabel('Angle');% Set up y Axis labels
title('Usefull');% Set title
xlim([0 6000]);% Set up X Axis display range
ylim([0 180]);% Set up Y Axis display range
set(gcf,'position',[50,70,1400,700]);% Set up figure Location and size
text(xloc,yloc,showstr);% Display text at coordinate points
yRange=ylim;% Get current figure Of y Axis display range
7、 ... and 、 Save pictures and csv data
% Whether the save path exists , There is no new building
if ~isfolder(savepath)
mkdir(savepath);
end
saveas(2,strcat(savepath,'001.jpg');% preservation figure2
saveas(1,strcat(savepath,'002.jpg');% preservation figure1
savepath=strcat(savepath,'.csv');
csvwrite(savepath,Data);
边栏推荐
猜你喜欢

Interview question 17.11. word distance ●●

自媒体人必备的4个资源工具,每一个都很实用
![[文献阅读] - HRL -[HRL with Universal Policies for Multi-Step Robotic Manipulation]](/img/34/06d5ba3af4e6e775a335324c020161.png)
[文献阅读] - HRL -[HRL with Universal Policies for Multi-Step Robotic Manipulation]

QVariant的使用

Mongodb的特点、与MySQL的差别、以及应用场景

Use of qvariant

invalid syntax

Network Security Learning (XIV) IP protocol

Qt5.12 installation error prompt: c:\qt5.12.11\vcredist\vcredist_ msvc2019_ x86.exe /norestart /q

Madness. MySQL learning.
随机推荐
Rental experience post
Why should we launch getaverse?
Tfrecord write and read
Circle detection and line detection of PCL
Experience of machine learning with Google Lab
TFrecord写入与读取
Day 3 experiment
5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)
[literature reading] - HRL -[hrl with universal policies for multi step robotic control]
单模型常识推理首超人类!HFL登顶OpenBookQA挑战赛
校验码生成
AI首席架构师12-AICA-工业生产过程优化场景下产业落地解析
Qt中文编程遇C2001错误,提示“常量中有换行符”
【自然语言处理】【向量表示】AugSBERT:改善用于成对句子评分任务的Bi-Encoders的数据增强方法
[natural language processing] [vector representation] augsbert: improve the data enhancement method of Bi encoders for paired sentence scoring tasks
【PMP学习笔记】第1章 PMP体系引论
[tensorflow] 关于 seed
自媒体人必备的4个资源工具,每一个都很实用
Interview question 17.11. word distance ●●
SSH服务器CBC加密模式漏洞(CVE-2008-5161)