当前位置:网站首页>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);
边栏推荐
- 码蹄集 精准弹幕
- Ribbon execution logic source code analysis
- Simple application of partial labels and selectors
- 5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)
- Qtreewidget control of QT
- Can generic types be used in array
- Design of Butterworth filter and drawing of amplitude frequency characteristic curve
- 码蹄集 万民堂大厨
- 【MySQL提权】UDF提权(附带大马)
- 栈与Stack类
猜你喜欢

Network security and level protection

Simple setting of drop-down triangle

Qt中文编程遇C2001错误,提示“常量中有换行符”

We media people must have four material websites, and don't worry about finding materials anymore

Mocha test

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

Dom and events

Notification(状态栏通知)详解

Von Neumann architecture

Qtreewidget control of QT
随机推荐
Use of qvariant
Network Security Learning (XIII) data link layer
721. Account consolidation ●●, and collection
Simple setting of drop-down triangle
Anaconda~Upload did not complete.
Stack simulation queue
Extended configuration of static routing in the second experiment
汇编语言与微机原理实验一、实验二、实验三:分支程序设计/循环程序设计/子程序设计
MathType installation and solution cannot solve the problem of crtl+v
uvm_hdl——DPI在UVM中的实现(四)
每周推荐短视频:需要协同的智能设备越来越多,给物联网开发提出更大挑战?
Tfrecord write and read
MySQL data type
721. 账户合并 ●●、并查集
Summary of my 2020 online summer camp
5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)
Learning notes of technical art hundred people plan (1) -- basic rendering pipeline
DOM event binding
The difference between abstract classes and interface interfaces
Force deduction solution summary 919 complete binary tree inserter