fa
Feedback
MATLAB TIPS

MATLAB TIPS

رفتن به کانال در Telegram

Matlab的一些现成脚本、函数,前人写的技巧、教程、文档。 Just tricks that finally work or what have learnt through search engines.受限于个人领域和Matlab水平,诚邀频道管理者;只要在使用Matlab过程中顺手把用上的网页、帖子发上来就好,十分简单。请联系 @MatLabTipsBot。#MATLAB

نمایش بیشتر
2 701
مشترکین
اطلاعاتی وجود ندارد24 ساعت
+67 روز
+1530 روز
آرشیو پست ها
MATLAB Interface for REFPROP and CoolProp MATLAB Central - File Exchange - rating:5.0
MATLAB Interface for REFPROP and CoolProp MATLAB Central - File Exchange - rating:5.0

Why Japan is Automating Harvesting #YouTube via MATLAB@YouTube (author: MATLAB)

GPS Receiver Position MATLAB Central - File Exchange - rating:4.6
GPS Receiver Position MATLAB Central - File Exchange - rating:4.6

Connect Simulink to Agentic AI #YouTube via MATLAB@YouTube (author: MATLAB)

GPS Broadcast Orbits MATLAB Central - File Exchange - rating:5.0
GPS Broadcast Orbits MATLAB Central - File Exchange - rating:5.0

Using Agentic AI to Design and Deploy a Control System #YouTube via MATLAB@YouTube (author: MATLAB)

GLTF for MATLAB MATLAB Central - File Exchange - rating:5.0
GLTF for MATLAB MATLAB Central - File Exchange - rating:5.0

Direction-Finding and Geolocation Overview #YouTube via MATLAB@YouTube (author: MATLAB)

circular tree chart MATLAB Central - File Exchange - rating:5.0
circular tree chart MATLAB Central - File Exchange - rating:5.0

rose bouquet MATLAB Central - File Exchange - rating:5.0
rose bouquet MATLAB Central - File Exchange - rating:5.0

KalmanFilter MATLAB Central - File Exchange - rating:5.0
KalmanFilter MATLAB Central - File Exchange - rating:5.0

lymph - discontinuous poLYtopal methods for Multi-PHysics MATLAB Central - File Exchange - rating:5.0
lymph - discontinuous poLYtopal methods for Multi-PHysics MATLAB Central - File Exchange - rating:5.0

Connect MATLAB to AI Coding Agents #YouTube via MATLAB@YouTube (author: MATLAB)

汽车智能控制综合课程设计 MATLAB Central - File Exchange - rating:5.0 (RSS) 课程把永磁同步电机工作原理、矢量控制算法、转矩转速闭环控制理论、换挡控制理论的讲解与MATLAB软件深度结合,内容包括从电动汽车两挡电驱动系统建模→永磁同步电机矢量控制仿真模型设计+换挡电机控制仿真模型设计→两挡电驱动系统换挡逻辑设计及功能仿真验证→基于TI C2000控制器的永磁同步电机及换挡电机实机控制实验,使学生逐步掌握应用自动控制原理基本知识进行控制模型设计的基本方法。模型简介如下:1.两挡电驱动系统仿真模型 基于MATLAB/Simulink平台搭建,用于模拟和分析搭载两挡变速器的纯电动汽车的动态性能、能量经济性以及换挡控制策略。该模型采用模块化设计,可以方便地调整电机参数、电池容量、减速比、变速箱传动比等关键参数,快速评估不同配置方案的综合性能,从而找到最优的动力系统匹配方案。2.换挡直流电机位置闭环控制模型包括仿真和基于TI TMS320F28069处理器的实机控制模型,位置闭环采用PD控制。3.换挡直流电机换挡力闭环控制包括仿真和基于TI TMS320F28069处理器的实机控制模型,换挡力闭环采用PI控制。4.永磁同步电机转速转矩闭环控制包括基于MATLAB/Simulink/Simscape设计的永磁同步电机转速转矩控制仿真模型、基于TI TMS320F28335处理器的永磁同步电机转速转矩实机控制模型。内环为电流环,采用开环和闭环控制相结合的方式;外环为转速环,采用PI控制。5.换挡逻辑仿真模型基于MATLAB/Simulink/Stateflow设计,模型包括降矩、摘挡、调速、挂挡、升矩等5个过程。当换挡指令为1时,执行降档操作;当换挡指令为2时,执行升档操作。

​​eVTOL Drone Design with Simscape MATLAB Central - File Exchange - rating:5.0 (RSS) # eVTOL Drone Design with SimscapeElectric Vertical Take-Off and Landing (eVTOL) aircraft represent a significant advancement in aviation technology, combining the benefits of electric propulsion with the versatile capabilities of VTOL operations. These aircraft are designed to take off and land vertically, similar to helicopters, while also achieving efficient forward flight like traditional fixed-wing aircraft. eVTOL aircraft are being explored for diverse applications, including passenger transport, cargo delivery and medical evacuation. The ability to transition between hover and forward flight modes allows these aircraft to perform tasks that require both agility and speed.[![View on File Exchange]( in MATLAB Online]() The examples in this repository show you how to model powertrain of Electric Vertical Take-Off and Landing Drone for range estimation, battery sizing and control tuning. There are different fidelity of powertrain components, equivalent battery, table-based battery, battery pack and different fidelty of propulsion unit. The VTOL model is a coupled electrical, mechanical, model, UAV path planning and 6DoF euler block built using Simscape™ Battery™, Simscape Electrical™, Simscape Fluids™, UAV Toolbox™, Aerospace Toolbox™ Libraries### **Powertrain of The Aircraft** ### ### **Visualization of Simulation** ###To visualise the simulation select "Visualization Mode: On" from model canvas. ## **Battery Component Sizing and Range Estimation for Different Flight Modes.** ## ## **Control Tuning for Motor, Hover Mode and Fixed Wing Mode.** ## ## Setup * Clone the project repository.* Open eVTOLDroneSimscape.prj to get started with the project. * Requires MATLAB® release R2024b or newer.For a detailed example on VTOL design and control tuning, see example[Customize VTOL UAV Configuration]( learn more about modeling and simulation with Simscape, please visit:* [Simscape Getting Started Resources]()* Product Capabilities: * [Simscape]() * [Simscape Driveline]() * [Simscape Electrical]() * [Simscape Fluids]() * [Simscape Multibody]( © 2025 The MathWorks, Inc.https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/180791-evtol-drone-design-with-simscape)[![Openhttps://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=simscape/eVTOL-Drone-Simscapehttps://www.mathworks.com/help/uav/ug/customize-vtol-configuration.html)Tohttps://www.mathworks.com/solutions/physical-modeling/resources.htmlhttps://www.mathworks.com/products/simscape.htmlhttps://www.mathworks.com/products/simscape-driveline.htmlhttps://www.mathworks.com/products/simscape-electrical.htmlhttps://www.mathworks.com/products/simscape-fluids.htmlhttps://www.mathworks.com/products/simscape-multibody.html)Copyright

Deep Learning Toolbox Model for VGG-19 Network MATLAB Central - File Exchange - rating:4.5 (RSS) VGG-19 is a pretrained Convolutional Neural Network (CNN) that has been trained on approximately 1.2 million images from the ImageNet Dataset () by the Visual Geometry Group at University of Oxford (). The model has 19 layers and can classify images into 1000 object categories (e.g. keyboard, mouse, coffee mug, pencil).Opening the vgg19.mlpkginstall file from your operating system or from within MATLAB will initiate the installation process for the release you have. This mlpkginstall file is functional for R2017a and beyond. Use vgg19 instead of imagePretrainedNetwork if using a release prior to R2024a.Usage Example:% Access the trained model[net, classes] = imagePretrainedNetwork("vgg19");% See details of the architecturenet.Layers% Read the image to classifyI = imread('peppers.png');% Adjust size of the imagesz = net.Layers(1).InputSizeI = I(1:sz(1),1:sz(2),1:sz(3));% Classify the image using VGG-19scores = predict(net, single(I));label = scores2label(scores, classes)% Show the image and the classification resultsfigureimshow(I)text(10,20,char(label),'Color','white')http://image-net.org/indexhttp://www.robots.ox.ac.uk/~vgg/research/very_deep/

UpSet plot MATLAB Central - File Exchange - rating:4.8 (RSS) Draw to show set data with more than three Intersections. Suppor
UpSet plot MATLAB Central - File Exchange - rating:4.8 (RSS) Draw to show set data with more than three Intersections. Supports both 'intersect' and 'distinct' modes and large-scale dataset.Basic uasge | UpSet mode: 'distinct'(default)rng(1)% Define set names (5 categories).setName = {'RB1','PIK3R1','EGFR','TP53','PTEN'};% Generate random binary membership matrix (200 samples, 5 sets).setMat = rand([200, 5]) > 0.85;% Create UpSet plot object.USP = UpSetPlot(setMat, 'SetName',setName);USP.calc(); % Calculate intersection sizes. USP.draw(); % Render the UpSet plot.UpSet mode: 'intersect'rng(1)setName = {'RB1','PIK3R1','EGFR','TP53','PTEN'};setMat = rand([200, 5]) > 0.85;% Create UpSet plot object with 'intersect' mode.USP = UpSetPlot(setMat, 'SetName',setName, 'Mode','intersect');USP.calc(); USP.draw();Change colorsrng(5)setMat = rand([200, 5]) > 0.85;USP = UpSetPlot(setMat);% Grayscale color schemeUSP.BarColorI = [ 61, 58, 61]./255;USP.BarColorS = [ 61, 58, 61]./255;USP.LineColor = [... View original post

sankey plot MATLAB Central - File Exchange - rating:4.8 (RSS) Basic usage - linkslinks={'a1','A',1.2;'a2','A',1;'a1','B',.6;'
sankey plot MATLAB Central - File Exchange - rating:4.8 (RSS) Basic usage - linkslinks={'a1','A',1.2;'a2','A',1;'a1','B',.6;'a3','A',1; 'a3','C',0.5; 'b1','B',.4; 'b2','B',1;'b3','B',1; 'c1','C',1; 'c2','C',1; 'c3','C',1;'A','AA',2; 'A','BB',1.2; 'B','BB',1.5; 'B','AA',1.5; 'C','BB',2.3; 'C','AA',1.2};% Create a Sankey diagram object% 创建桑基图对象SK = SSankey(links(:,1), links(:,2), links(:,3));% Start drawing% 开始绘图SK.draw()Basic usage - adjMat% Define inter-layer adjacency matrices% 定义层间邻接矩阵A12 = [1,2,1; 1,2,3; 2,0,1];A23 = [1,4; 2,1; 0,3];A34 = [1,5; 2,3];% Assemble global block matrix (main diagonal = zero, super-diagonal = A12, A23, A34)% 组装全局分块矩阵(主对角线为零,上对角线为 A12, A23, A34)adjMat = mergeAdjMat({A12, A23, A34});SK = SSankey([],[],[], 'AdjMat',adjMat);SK.draw()The compressed package contains numerous usage examples.

200 colormaps MATLAB Central - File Exchange - rating:4.8 (RSS) See the demos in package.Citations & AcknowledgementsHunter,
200 colormaps MATLAB Central - File Exchange - rating:4.8 (RSS) See the demos in package.Citations & AcknowledgementsHunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95.Bury, T. (2023). scicomap: Scientific colormaps for Python. der Velden, E. (2020). CMasher: Scientific colormaps for Python. , F. (2018). Scientific colour maps. Zenodo. , K. M., Greene, C. A., Hetland, R. D., Zimmerle, H. M., & DiMarco, S. F. (2016). True colors of oceanography. Oceanography, 29(3), 10-11. , P. (2015). *Good Colour Maps: How to Design Them*. arXiv:1509.03700Glasbey, C. A., van der Heijden, G. W. A. M., Toh, V. F. K., & Gray, A. (2007). Colour displays for categorical images. *Color Research & Application*, 32(4), 304–309. , M. (2023). palettable: Color Palettes for Python [Computer software]. Retrieved from https://github.com/ThomasBury/scicomapvanhttps://cmasher.readthedocs.io/Cramerihttps://doi.org/10.5281/zenodo.1243862Thynghttps://doi.org/10.... View original post

FSDA - Flexible Statistics Data Analysis toolbox MATLAB Central - File Exchange - rating:5.0 (RSS) ![GitHub top language]( release (latest by date)]( code size in bytes]( FSDA on File Exchange]() [![DOI]( Status]( contributors]( commits since latest release]( in MATLAB Online]()## 🤝 SupportContributions, issues, feature requests and sponsorship are all welcome!Give a ⭐️ if you like this project!# [Flexible Robust Statistics Data Analysis]()## FSDA release  2026a is out. (June 2026)| New Features and Changes || --- || [Release notes (HTML file)]()| Release notes (YouTube video) | ## FSDA release  2025b is out. (December 2025)| New Features and Changes || --- || Release notes (YouTube video) | In order to run the new features run the file below and enjoy!!!| FileName | View :eyes:| Run ▶️ | Jupiter notebook || -------- | ---- | --- | ---- ||`New_features_FSDA2025b`: examples with the new features | [![File Exchange]() | [![Open in MATLAB Online]() | [New_features_FSDA2025b.ipynb]() |## Running Examples on MATLAB OnlineGet started with some example scripts right away using MATLAB Online. You can view or run each of the examples listed below. Sample data are downloaded when executing the scripts.FSDA has a series of functions which complement those of the Statistics and Machine Learning toolbox.### **Exploratory data analysis** | Name | Analysis Type | View :eyes: | Run ▶️|| --- | --- | --- | --- || Missing data analysis. Discover any structure of missing observations in the data and produces a report about lower and upper univariate outliers. | Call to function [mdpattern]() | [![File Exchange]() | [![Open in MATLAB Online]() | Compare robust and non robust indexes. Create histograms with grouping variable and clickable legend. | Call to functions [grpstatsFS](), [histFS]() and [clickableMultiLegend]() | [![File Exchange]() | [![Open in MATLAB Online]() || Label the outliers in the boxplots | Call to function [add2boxplot]()| [![File Exchange]() | [![Open in MATLAB Online]() |---### **Interactive Principal component analysis non robust/robust** | Name | Analysis Type | View :eyes: | Run ▶️|| --- | --- | --- | --- ||**Automatically show the plots of variance explained, correlations with PCA and outlier map to find and produce a GUI written with App designer to show in an interactive way different types of biplots.** Row and column points associated with arrows can be hidden or shown. The sign of the PCs can be interactively changed. The points can be shown with a color which is proportial to the othogonal distance to the space of the first 2 PCs. This enables us to immediately understand which are the units that are not well represented in the subspace formed by the first two PCs | Call to function [pcaFS]() | [![View on File Exchange]() | [![Open in MATLAB Online]() ||**Interactive brushing in the space of the first two PCs.** It is possible to brush a region in the biplot of the first two PCs and see the units shown in the original scatter plot matrix. Moreover if the units are are geographical coordinates and the latitude and longitude is given the geobubble plot is automatically shown. | Call to function [biplotFS]() | [![View on File Exchange]() | [![Open in MATLAB Online]() | **Robust principal component analysis.** It is possible to use different robust methods to find a subset of clean units. For examples both the use of MCD with a level of trimming set by the user or the forward search fixing the proportion of units to use or to have an automatic outlier detection procedure. | Call to function [pcaFS]() with option robust set to true. | [![View on File Exchange]() | [![Open in MATLAB Online]() |---### **Interactive Correspondence analysis non robust/robust** | Name | Analysis Type | View :eyes: | Run ▶️|| --- | --- | --- | --- || **Correspondence analysis (traditional and robust).** It is possible to automatically obtain the, singular values, the inertia, explained, and cumulative. For Row and Column Points we automatically show, for each dimension: the scores `Scores`, the Contribution of... View original post