当前位置:网站首页>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 执行逻辑源码解析
- Structure principle of micro ball vibration switch with chip
- DHCP first static experiment
- Recyclerview computehorizontalscrollextend computehorizontalscrollrange computehorizontalscroll for calculating the sliding distance
- [PMP learning notes] Chapter 1 Introduction to PMP System
- 互联网协议之 IPFS
- Analysis of Excel file
- [PTA] 7-19 check face value (15 points)
- We media people must have four resource tools, each of which is very practical
- Extended configuration of static routing in the second experiment
猜你喜欢

Deploy flash based websites using Google cloud

单模型常识推理首超人类!HFL登顶OpenBookQA挑战赛

贴片微型滚珠振动开关的结构原理

Use of qvariant

【MySQL提权】UDF提权(附带大马)

Understanding of forward proxy and reverse proxy

Interview question 17.11. word distance ●●

新媒体运营策略(以小红书为例)帮助你快速掌握爆款创作方法

Simple setting method of search box

Recyclerview computehorizontalscrollextend computehorizontalscrollrange computehorizontalscroll for calculating the sliding distance
随机推荐
Learning notes of technical art hundred people plan (2) -- vector
uvm_ HDL -- implementation of DPI in UVM (4)
[PTA] 7-24 minimum fraction (15 points)
Qtreewidget control of QT
【接口性能优化】索引失效的原因以及如何进行SQL优化
uvm_hdl——DPI在UVM中的实现(四)
单元测试,写起来到底有多痛?
recyclerview计算滑动距离之computeHorizontalScrollExtent-computeHorizontalScrollRange-computeHorizontalScrol
The difference between abstract classes and interfaces
贴片微型滚珠振动开关的结构原理
技术美术百人计划学习笔记(2)--向量
CUDA environment construction
HJ9 提取不重复的整数
技术美术百人计划学习笔记(1)--基础渲染管线
The new media operation strategy (taking xiaohongshu as an example) helps you quickly master the creative method of popular models
[natural language processing] [vector representation] augsbert: improve the data enhancement method of Bi encoders for paired sentence scoring tasks
[opencv] edge detection [API and source code implementation]
JVM memory area
The difference between abstract classes and interface interfaces
互联网协议之 IPFS