3370 views|1 replies

424

Posts

8

Resources
The OP
 

Interaction between data collection and MATLAB [Copy link]

The content is relatively simple, that is, the ADC on the ufun board collects data, transmits it to the serial port interface of matlab through the serial port, and uses matlab to perform certain data processing.

Let's take a look at the matlab program first

The above is Matlab opening the serial port. The trouble is that the serial port number needs to be changed. If there is no such serial port, the program will report an error.

This section stores the data transmitted by the ufun serial port into a matrix, which is equivalent to the array in C.

Call the drawing function to draw, see the previous post for the effect.

This is the function of Matlab to receive serial port data, which can directly store multiple data.

In order to update the data, a while loop is used. After processing a set of data, the drawing is closed once. When another set of data appears, it is directly drawn together with the previous data to achieve a refresh effect.

In this way, we receive a group of data and process it, and integrate them to achieve continuous data processing, completing the data exchange between matlab and ufun.

The code refers to the Fulai example

This post is from stm32/stm8

Latest reply

This post was last edited by hotsauce1861 on 2019-12-2 15:39 Could you please share the Matlab code? It looks good.   Details Published on 2019-12-2 15:38
 

295

Posts

1

Resources
2
 
This post was last edited by hotsauce1861 on 2019-12-2 15:39

Could you please share the Matlab code? It looks good.

This post is from stm32/stm8
 
Personal signature

我的小站 我的博客

 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list