es
Feedback
MATLAB TIPS

MATLAB TIPS

Ir al canal en Telegram

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

Mostrar más
2 646
Suscriptores
+124 horas
-57 días
-2430 días
Archivo de publicaciones
What Is Aerospace Toolbox? #YouTube via MATLAB@YouTube (author: MATLAB)

📡 MATLAB Central - File Exchange - rating:4.8 | Locally Optimal Block Preconditioned Conjugate Gradient ### Titlelobpcg — Locally Optimal Block Preconditioned Conjugate Gradient eigensolver### Short Summarylobpcg computes a few extreme eigenpairs of large Hermitian standard and generalized eigenproblems using a block preconditioned conjugate gradient method. It supports matrix and function-handle operators, optional constraints, optional preconditioning, and iteration histories for convergence analysis. Tested in GNU Octave Version: 11.3.0 and MATLAB with Parallel Computing Toolbox 26.2 (R2026b), but is expected to work on any post 2008 MATLAB and Octave.### Descriptionlobpcg is an iterative eigensolver for large-scale Hermitian problems where forming a full factorization is impractical. It is designed to compute partial spectra efficiently, especially for sparse matrices and operators supplied as functions or function handles.The solver accepts:- a full or sparse initial block of vectors,- a Hermitian operator A,- optional generalized operator B,- optional preconditioner T,- optional constraint vectors Y,- tolerance, iteration limit, and verbosity settings.It returns orthonormalized eigenvectors, the corresponding eigenvalues, a convergence flag, and optional histories of eigenvalue estimates and residual norms.### Features- Standard and generalized Hermitian eigenproblems- Block iterations for clustered and repeated eigenvalues- Optional preconditioning- Optional orthogonality constraints- Supports matrix, function-name, and function-handle operators- Works with sparse and full inputs- Residual and eigenvalue history output for diagnostics- Pure MATLAB (GNU Octave compatible) code- Support for MATLAB distributed or codistributed arrays- Support for double. single, and complex data types - Suitable for MATLAB and GNU Octave workflows### Typical Use CasesThis solver is useful for:- structural mechanics and vibration modes,- graph and network spectral problems,- repeated or clustered eigenvalue problems,- efficient preconditioning available,- large problems where MATLAB's built-in eig is too expensive and eigs is not the desired workflow.### Notes- A does not need to be positive definite- The code computes the algebraically smallest eigenvalues but can trivially be used for the largest simply applied to -A.- B and T should be positive definite when used. There is no check, and the code may break otherwise.- The code is intended for partial eigensolutions, not high-precision full diagonalization.- Performance and convergence depend on block size, preconditioner quality, and the spectral distribution.### Other implementations- A simplified C-version of this code is a part of thehttps://github.com/lobpcg/blopexpackage and is directly available, e.g., in SLEPc and HYPRE.- A Python version LOBPCG is inhttps://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lobpcg.html- LOBPCG is implemented in many open-source packages in various languages for a great variety of applications; see https://en.wikipedia.org/wiki/LOBPCG- https://mfem.org/examples/ Maxwell Eigenproblem LOBPCG run generates the image used to identify this package.### ReferenceA. V. Knyazev, “Toward the Optimal Preconditioned Eigensolver: Locally Optimal Block Preconditioned Conjugate Gradient Method,” SIAM Journal on Scientific Computing, 23(2), 517–541, 2001.### Docstring%LOBPCG solves Hermitian partial eigenproblems using preconditioning%% [blockVectorX,lambda]=lobpcg(blockVectorX,operatorA)%% outputs the array of algebraic smallest eigenvalues lambda and% corresponding matrix of ortho-normalized eigenvectors blockVectorX of the% Hermitian (full or sparse) operator operatorA using input matrix% blockVectorX as an initial guess, without preconditioning, somewhat% similar to%% opts.issym=1;opts.isreal=1;K=size(blockVectorX,2);% [blockVectorX,lambda]=eigs(operatorA,K,'SR',opts);%% for real symmetric operator operatorA, or%% K=size(blockVectorX,2);[blockVectorX,lambda]=eigs(operatorA,K,'SR');% for --------- 🔀 Routify — 在 Telegram 聊天之间自动转发消息。

📡 MATLAB Central - File Exchange - rating:5.0 | DataHash DATAHASH - Hash for Matlab array, struct, cell or file Hash = DataHash(Data, Opts, ...) Data: Array of built-in types (U)INT8/16/32/64, SINGLE, DOUBLE (real or complex) CHAR, LOGICAL, CELL, STRUCT (scalar or array, nested), function\_handle. Options: List of char vectors: Hashing method: 'SHA-1', 'SHA-256', 'SHA-384', 'SHA-512', 'MD2', 'MD5'. Output format: 'hex', 'HEX', 'double', 'uint8', 'base64' Input type: 'array': The contents, type and size of the input [Data] are considered for the creation of the hash. Nested CELLs and STRUCT arrays are parsed recursively. Empty arrays of different type reply different hashs. 'file': [Data] is treated as file name and the hash is calculated for the files contents. 'bin': [Data] is a numerical, LOGICAL or CHAR array. Only the binary contents of the array is considered, such that e.g. empty arrays of different type reply the same hash. 'ascii': Same as 'bin', but only the 8-bit ASCII part of the 16-bit Matlab CHARs is considered. Hash: String or numeric vector. EXAMPLES: Default: MD5, hex: DataHash([]) % 7de5637fd217d0e44e0082f4d79b3e73SHA-1, Base64: S.a = uint8([]); S.b = {{1:10}, struct('q', uint64(415))}; DataHash(S, 'base64', 'SHA-1') % ZMe4eUAp0G9TDrvSW0/Qc0gQ9/AComparison with standard hash programs using ASCII strings: DataHash('abc', 'SHA-256', 'ascii')Michael Kleder's "Compute Hash" works similar, but does not accept structs, cells or files: http://www.mathworks.com/matlabcentral/fileexchange/8944"GetMD5" is 2 to 100 times faster, but it replies only MD5 hashes and a C-compiler is required: http://www.mathworks.com/matlabcentral/fileexchange/25921Tested: Matlab 7.7, 7.8, 7.13, 8.6, 9.1, 9.5, Win7&10/64, Java: 1.3, 1.6, 1.7Bugreports and enhancement requests are welcome. Feel free to ask me about a version for Matlab 6.5.PS. MD5 and SHA1 hash values are "broken": You can construct a data set, which has a specific hash. But to check the integrity of files or to to recognize a set of variables, both methods are reliable.See also Stefano Pradella's expanded version at: https://github.com/stefanopradella/DataHash --------- 🎤 What's The Song — 通过片段识别任何歌曲。

📡 MATLAB Central - File Exchange - rating:5.0 | gearsInMesh This MATLAB library provides a set of functions for working with involute gears. It allows you to:- Calculate involute gear geometry- Plot a single gear- Plot multiple gears in mesh- Animate gears in meshThe functions support both involute spur gears and helical involute gears.**Graphics dependency**For graphical output, the library uses the draw19 package, which is available on MATLAB File Exchange:https://www.mathworks.com/matlabcentral/fileexchange/71745-draw19Please install draw19 and add it to your MATLAB path before using the visualization and animation functions.**User guide**A quick user guide describing the workflow and main functions is available here:https://www.researchgate.net/publication/334065197\_MATLAB\_program\_for\_calculating\_the\_geometry\_of\_involute\_gearsThis toolbox can be useful for education, demonstration of gear meshing, and preliminary analysis of gear geometry.

📡 MATLAB Central - File Exchange - rating:5.0 | Laplacian in 1D, 2D, or 3D This MATLAB/Octave-compatible code computes analytically **exact eigenpairs of the negative Laplacian operator** in 1D, 2D, or 3D on a rectangular finite-difference grid. It supports a wide range of boundary condition combinations: **Dirichlet (D)**, **Neumann (N)**, and **Periodic (P)**. The first mandatory output is the **sparse Laplacian matrix itself** via Kronecker sums of 1D discrete Laplacians. The actual numerical entries of the matrix fit int8 format, but only double data class is yet supported for sparse matrices in MATLAB.References- https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors_of_the_second_derivative">Eigenvalues and eigenvectors of the second derivative- https://en.wikipedia.org/wiki/Kronecker_sum_of_discrete_Laplacians">Kronecker sum of discrete LaplaciansExamplesCompute both matrix and eigenpairs for a 3D Laplacian with mixed boundary conditions:[A, lambda, V] = laplacian([100, 45, 55], {'DD', 'NN', 'P'}, 20); Compute only the matrix:A = laplacian([100, 45, 55], {'DD', 'NN', 'P'}); Features- Supports **Dirichlet** , **Neumann** , and **Periodic** BCs (including mixed combinations)- Computes eigenvalues and eigenvectors analytically using Kronecker structure- Builds the Laplacian matrix directly- Compatible with **GNU Octave**Related Projects. This code is a part of the **BLOPEX eigensolver package:**- https://en.wikipedia.org/wiki/BLOPEX">Wikipedia: BLOPEX- GitHub BLOPEX Repository that also includes tests and solversNotesThe Python multidimensional code in SciPy https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.LaplacianNd.html">LaplacianNd — SciPy Manualsupports arbitrary dimensions, but it does **not yet support mixed boundary conditions**.Being superseded by MATLAB Sparse nD Laplacian with analytic eigenpairs. that supports arbitrary dimensions and mixed boundary conditions on opposite faces.Authors- Bryan C. Smith- Andrew V. Knyazev --------- 🔀 Routify — 在 Telegram 聊天之间自动转发消息。

Design of Experiments with DOE Explorer #YouTube via MATLAB@YouTube (author: MATLAB)

What Is Aerospace Blockset? #YouTube via MATLAB@YouTube (author: MATLAB)

📡 MATLAB Central - File Exchange - rating:5.0 | PHX Toolbox PHX is an object-oriented physics engine for MATLAB. Scenes are built from objects such as bodies, shapes, joints, springs, force fields and can be drawn directly into MATLAB axes. Toolbox includes MATLAB API, Simulink block, documentation and examples. MATLAB R2025a or newer is required.

📡 MATLAB Central - File Exchange - rating:4.7 | Introduction to Kalman Filter and Its Applications # Kalman_Filter## OverviewMATLAB tutorial examples of the Kalman filter (KF) and extended Kalman filter (EKF) for INS/GNSS navigation, target tracking, and terrain-referenced navigation (TRN, also called terrain-aided navigation).These are the authors' implementations accompanying the **peer-reviewed tutorial chapter** Introduction to Kalman Filter and Its Applications, with source and terrain data available directly in this repository. See the chapter citation, implementation map, and provenance.The accompanying tutorial chapter has received **over 500 citations** on https://scholar.google.com/citations?view_op=view_citation&hl=en&user=8b6KtGYAAAAJ&citation_for_view=8b6KtGYAAAAJ:hC7cP41nSMkC">Google Scholar.For implementations in Python, C++, or other languages, follow the KF equations, EKF update procedure, and terrain measurement model.## MethodPredict the state and covariance with a motion model, then correct them using measurements. The linear KF uses position/velocity observations; the EKFs linearize angle/range or terrain-height observations around the current estimate.### Algorithms and source| Method and application | Chapter | Implementation and runnable example | Technical reference ||---|---|---|---|| Linear KF: inertial/GNSS position and velocity | Sections 2.2-2.3, Eqs. (3)-(18) | KF.m | Kalman filter || EKF: angle/range target tracking | Sections 3.2-3.3.1, Eqs. (23)-(32) | EKF_1.m | Extended Kalman filter || EKF: terrain-referenced navigation | Sections 3.2, 3.3.2, Eqs. (33)-(40) | EKF_2.m | Terrain navigation |## ExamplesRun commands from the repository root with MATLAB and Statistics and Machine Learning Toolbox (normrnd). The shell commands use matlab -batch (R2019a or later); the terrain example uses the included DEM.mat.Generate current-code versions of all seven simulation figures as PNG and PDF files:``bashmatlab -batch "generate_figures"`Generate one figure, such as Figure 5:`bashmatlab -batch "generate_figures(5)"`See the figure map and export options for Figures 1-5, 8, and 9, seeds, and output metadata. The exporter uses the current equations and simulation settings.Run the seeded introductory INS/GNSS example without opening figure windows:`bashmatlab -batch "set(groot,'defaultFigureVisible','off'); main; disp(x_RMSE(:,end))"`In an interactive MATLAB session, select the repository root as the current folder and enter main to see the plots. The scripts clear their calling workspace and close existing figures; save work before running them.See Examples for the two EKF commands, outputs, seeds, and terrain-data conventions.## Implementation scopeEach script contains its model, simulation, filter updates, and plotting code. Current source includes covariance and measurement corrections, with settings and numerical assumptions documented for adaptation.### ChecksRun the focused example and figure checks:`bashmatlab -batch "addpath('tests/integration/examples'); verify_examples; verify_figures"``These check example outputs, deterministic reruns, terrain loading, and figure export.## CitationFor academic attribution, please acknowledge this repository when adapting its code or examples.If you use or adapt these methods or examples, please cite:> Youngjoo Kim and Hyochoong Bang. “Introduction to Kalman Filter and Its Applications.” In Introduction and Implementations of the Kalman Filter. IntechOpen, 2018. https://doi.org/10.5772/intechopen.80600">doi:10.5772/intechopen.80600.Machine-readable software and chapter metadata are in CITATION.cff.## License and provenanceThe license specifies the copyright and redistribution conditions. Citation requests are separate from those license conditions.See provenance for source-distribution and dataset details, and implementation notes for model and numerical choices. --------- 🖼 NSFW Remover - 自动删除群组中的不当内容。

Discover What's New: R2026b Release Highlights #YouTube via MATLAB@YouTube (author: MATLAB)

What Is Simscape Electrical? #YouTube via MATLAB@YouTube (author: MATLAB)

📡 MATLAB Central - File Exchange - rating:5.0 | Next Available Filename NEXTNAME returns a filename, incrementing a numbered suffix such that the returned name is not currently used by any file or folder.On occasion it may be required to save files without knowing or requiring a particular number sequence, for example when saving interim results or backups during large calculations. Using an internal counter is one option, but this does not work when there are already existing files with the same names, or when the code is stopped-and-started unpredictably (e.g throws errors while calculating and is restarted). This function offers one simple solution: NEXTNAME will search for existing files/folders that match the provided inputs, increment an integer until the value is unused by any current filename, and then return the next unused filename.Note that unlike some other submissions on FEX, this function compares the number values, not the literal filenames! This means you will not get "x001" if e.g. "x1" or "x01" or "x00000001" already exist in the specified location.Syntax 1One text input is required: the folder/filename (including file extension, if required). The folder/filename must include one integer within angle brackets (aka less/greater than characters), e.g.: 'test.txt'. The integer will be incremented as required to define an unused filename. The angle brackets are not returned in the output.Syntax 2Three text inputs are required:The basic folder/filename, without any file extension.The suffix, which must contain one integer. Some examples of suffixes are: '0', '_1', '(5)', '-0001-backup', '_temp1', etc. This suffix will be appended to the folder/filename, before the file extension, after incrementing the integer as required to define an unused filename.The file extension, if required. For folders (or files without extensions) use '' or "".Note the path, name, and extension inputs can generally be obtained from a filename using FILEPARTS.IntegerThe integer specifies: the value to start incrementing from (this can be zero or any positive integer, i.e. 0, 1, 2, 3, etc.), the minimum width of the output number by using leading zeros as required. For example, "001" specifies the integer in the output has (minimum) width of three characters. The output integer will be automatically zero padded (if required) to this length.Examples% Current directory contains files 'A1.txt', 'A2.txt', and 'A4.txt':>> nextname("A.txt") % syntax 1ans = "A3.txt">> nextname("A","1",".txt") % syntax 2ans = "A3.txt">> nextname("A.txt") % syntax 1ans = "A003.txt">> nextname("A","001",".txt") % syntax 2ans = "A003.txt"% Directory 'test' contains subdirectories 'B(1)', 'B(2)', and 'B(4)':>> nextname('test/B()') % syntax 1ans = 'B(3)'>> nextname('test/B','(1)','') % syntax 2ans = 'B(3)'>> nextname('test','B()') % syntax 1ans = 'B(3)'>> nextname('test','B','(1)','') % syntax 2ans = 'B(3)'>> nextname('test','B()',true) % syntax 1ans = 'test/B(3)'>> nextname('test','B','(1)','',true) % syntax 2ans = 'test/B(3)'

📡 MATLAB Central - File Exchange - rating:5.0 | MATLAB AI Agent SDK # MATLAB AI Agent SDKhttps://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg">![Open in MATLAB Online](https://matlab.mathworks.com/open/github/v1?repo=matlab/matlab-ai-agent-sdk)MATLAB® AI Agent SDK lets you build and run AI agents in MATLAB.- Create agents based on OpenAI® Chat Completions, Ollama™, or OpenAI-compatible APIs.- Integrate LLMs and agentic workflows into your workflows in a targeted manner, retaining deterministic workflows when those are more suitable.- Create agentic tools that use: - large amounts of data - any MATLAB data type## Research PreviewThis SDK is a Research Preview under active development and APIs may change.Please leave feedback, report bugs and feature requests via Issues. We review all contributions, but we do not merge external pull requests. See CONTRIBUTING.md for details.Help us improve the MATLAB AI Agent SDK by completing our short feedback survey.## SetupUsing this add\-on requires MATLAB R2023a or newer.You can use the add\-on in MATLAB Online™ by clicking this link: https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg">![Open in MATLAB Online](https://matlab.mathworks.com/open/github/v1?repo=matlab/matlab-ai-agent-sdk)To use the add\-on on an installed version of MATLAB, you can clone the GitHub repository. In the MATLAB Command Window, run this command:``>> !git clone https://github.com/matlab/matlab-ai-agent-sdk.git`To run code from the add\-on outside of the installation directory, add the path to the installation directory.`>> addpath("path/to/matlab-ai-agent-sdk")`### OpenAIUsing the OpenAI Chat Completions API requires an OpenAI API key. For information on how to obtain one, as well as pricing, terms and conditions of use, and available models, see the https://platform.openai.com/docs/overview">OpenAI documentation.Set your key as an environment variable in a .env file:`OPENAI_API_KEY=`Then load it in MATLAB.`matlabloadenv(".env")`### OpenAI-Compatible APIsTo connect to APIs that are compatible with the OpenAI Chat Completions API, set your key as an environment variable in a .env file:`OPENAI_API_KEY=`If your API does not need an API key, set the environment variable OPENAI_API_KEY to "EMPTY".Then, when creating an LLM client, set the api argument of the aisdk.LLMClient function to "openai" and set the BaseURL name-value argument to the base URL of the API. For example, for OpenAI, BaseURL is "https://api.openai.com/v1".### OllamaTo connect to local or remote Ollama models, first install Ollama.After you have installed Ollama, you can install models from the MATLAB Command Window:`matlab!ollama pull `## Get StartedCreate an LLM client by using the aisdk.LLMClient function and using the API and the model name as input arguments, for example:`matlabclientOpenAI = aisdk.LLMClient("openai", "gpt-4.1-mini");clientOllama = aisdk.LLMClient("ollama", "");`Then, generate text by using the generate function.`matlabtext = generate(client, "This is an example prompt.")````text = "This is an example reponse."`### Create Chat With LLMThis example shows how to create a conversation with an LLM and automatically keep track of the message history.Create the agent from an LLM client client by using the aisdk.AIAgent function. Provide a system prompt.`matlabsystemPrompt = "Reply as if you are writing telegrams.";agent = aisdk.AIAgent(client,SystemPrompt=systemPrompt);`Run the agent by using the run function. Provide a prompt.`matlabprompt = "TOMATO FRUIT OR VEGETABLE STOP";run(agent,prompt)````ans = "TOMATO TECHNICALLY A FRUIT STOP COMMONLY USED AS VEGETABLE IN CULINARY CONTEXT STOP END OF TRANSMISSION."`Ask a follow up question by using the run function.`matlabrun(agent,"HOW ABOUT AVOCADO STOP")````ans = "AVOCADO ALSO A FRUIT STOP KNOWN AS ALLIGATOR PEAR STOP HIGH IN HEALTHY FATS AND NUTRIENTS STOP END OF TRANSMISSION."`Inspect the chat history by using the Messages property of the --------- 🗃 Instant Media Bot — 自动下载您群组中发布的链接中的媒体,无需命令。

📡 MATLAB Central - File Exchange - rating:5.0 | Scientific Prefix to Number The function SIP2NUM converts a string with an SI prefix (aka metric prefix, or engineering prefix) into a numeric value. For example the string '1 k' is converted to 1000. The bonus function BIP2NUM converts from Binary-prefixed string to numeric, for example the value '1 Ki' is converted to 1024.After testing many submissions on MATLAB FEX (see Acknowledgements) and not finding a single one that converted all values correctly, I wrote my own functions. And then exhaustively tested them to confirm that they actually give the correct output.This submission:Automatically detects the prefix, or it may be restricted to either a name or symbol.Detects coefficients including +/- sign, decimal digits, and exponent E-notation.Detects zero or more coefficients in the string.Returns the parts of the input string that are split by the detected coefficients and prefixes.Returns the number of significant figures detected in the coefficients.Includes the prefixes added in November 2022: ronna, quetta, ronto, and quecto.Reverse Conversionhttp://www.mathworks.com/matlabcentral/fileexchange/33174-number-to-scientific-prefixSI Prefix Examples>> sip2num('10 k') % OR sip2num('10.0 kilo') OR sip2num('10000') OR sip2num('1e4')ans = 10000>> [num,spl] = sip2num("Power: 200 megawatt")num = 200000000spl = ["Power: ","watt"]>> [num,spl,sgf] = sip2num("from -3.6 MV to +1.24kV potential difference.")num = [-3600000,1240]spl = ["from ","V to ","V potential difference."]sgf = [2,3]>> [num,spl] = sip2num("100 meter","meter") % Try it without the second option.num = 100spl = ["","meter"]>> sip2num(num2sip(9e12)) % 9 tera == 9e12 == 9*1000^4 == 9000000000000ans = 9000000000000Binary Prefix Examples>> bip2num('10 Ki') % OR bip2num('10.0 kibi') OR bip2num('10240') OR bip2num('1.024e4')ans = 10240>> [num,spl] = bip2num("Memory: 200 mebibyte")num = 209715200spl = ["Memory: ","byte"]>> [num,spl,sgf] = bip2num("From -3.6 MiB to +1.24KiB data allowance.")num = [-3774873.6,1269.76]spl = ["From ","B to ","B data allowance."]sgf = [2,3]>> [num,spl] = bip2num("100 Pixel","Pixel") % Try it without the second option.num = 100spl = ["","Pixel"]>> bip2num(num2bip(pow2(9,40))) % 9 tebi == pow2(9,40) == 9*1024^4 == 9895604649984ans = 9895604649984SI Prefixes (Bureau International des Poids et Mesures) Magnitude | Symbol | Name 1000^-10 | q | quecto 1000^-9 | r | ronto 1000^-8 | y | yocto 1000^-7 | z | zepto 1000^-6 | a | atto 1000^-5 | f | femto 1000^-4 | p | pico 1000^-3 | n | nano 1000^-2 | µ | micro 1000^-1 | m | milli 1000^0 | | 1000^+1 | k | kilo 1000^+2 | M | mega 1000^+3 | G | giga 1000^+4 | T | tera 1000^+5 | P | peta 1000^+6 | E | exa 1000^+7 | Z | zetta 1000^+8 | Y | yotta 1000^+9 | R | ronna 1000^+10 | Q | quettaBinary Prefixes (IEC 60027-2 A.2 and ISO/IEC 80000-13:2008) Magnitude | Symbol | Name 1024^1 | Ki | kibi 1024^2 | Mi | mebi 1024^3 | Gi | gibi 1024^4 | Ti | tebi 1024^5 | Pi | pebi 1024^6 | Ei | exbi 1024^7 | Zi | zebi 1024^8 | Yi | yobiNotesThese functions have been extensively tested against many edge cases, with particular attention to ensuring the correct handling of exponential notation. Compared to similar submissions available on MATLAB File Exchange, these functions correctly:parse negative strings (try '-1').parse E-notation values (try '1e0', '1e0 k', '1e30').

📡 MATLAB Central - File Exchange - rating:5.0 | Analytic Hierarchy Process Analytic Hierarchy Process (AHP) is a simple technique, developed by Thomas L. Saaty in the 1970s, for organizing and analyzing complex multi-objective decisions. It combines both quantitative and qualitative analysis elements and it finds application in group decision making. The philosophy of the technique is to decompose problem into a hierarchy of more easily understood sub-problems, each of which can be analyzed independently. Once the hierarchy is built, the decision makers systematically evaluate its various elements by comparing them to one another two at a time, with respect to their impact on an element above them in the hierarchy. The AHP converts these evaluations to numerical values that can be processed and compared over the entire range of the problem. A numerical weight is derived for each element of the hierarchy, allowing diverse and often incommensurable elements to be compared to one another in a rational and consistent way. In the final step of the process, numerical weights are calculated for each of the decision alternatives. These weights represent the alternatives' relative ability to achieve the goal.The function facilitates the following:• Simple AHP implementation• Multiple decision makers• Analytic Network Process (ANP): The generalization of the AHP, which incorporates dependences and feedbacks between decision criteria and options.• Fuzzy AHP and ANP: This are special versions of the simple AHP and ANP, which find application in fuzzy environments, where the relative importance of the decision criteria and the alternatives is uncertain.• Simulation: A Monte-Carlo simulation-based approach of AHP and ANP, which allows to compare distributions of weights and performs sensitivity analysis.• Cost-Benefit analysis: The benefit (AHP weights) in relationship with the cost of the respective option.• Optimization: In case of a resource allocation problem, the function estimates the optimal feasible combination of alternatives subject to the resources’ constraints.• Prediction combination: In case this is a forecasting combination problem, the function generates a weighted average forecast, using the combination weights and the individual forecasts as inputs.The package includes AHP Decision Studio, a graphical interface for users who prefer to work without writing code.The interface guides users through defining alternatives and criteria, assessing criterion importance, entering pairwise comparisons or numerical performance values, and reviewing the results. It includes:• Dropdown-based pairwise comparisons and numerical criteria where higher or lower values are preferred.• Ranking charts, results tables, and criterion-level priorities.• Sensitivity analysis with mean weights and percentile ranges.• Optional fuzzy approximation, network feedback, benefit–cost analysis, and budget-constrained selection.• Project saving and reopening, CSV export, and chart export as PNG.• A ready-to-run example and a user guide.To launch the interface, open START_HERE.m in MATLAB and click Run. No code editing is required. The interface supports a single decision maker and one cost resource.The ahp.m function remains fully usable independently of the interface. Users can call it directly from the MATLAB Command Window or their own scripts, including for multiple decision makers, multiple resource constraints, and forecast combination. Place ahp.m in your working folder or on the MATLAB path.The graphical interface requires MATLAB R2020b or newer. Budget-constrained optimization requires Optimization Toolbox. --------- 🖼 NSFW Remover - 自动删除群组中的不当内容。

Teaching Live Online Courses in the Age of Artificial Intelligence via MATLAB and Python Recipes for Earth Sciences (author: Martin H. Trauth)

📡 MATLAB Central - File Exchange - rating:5.0 | Spectral proper orthogonal decomposition (SPOD) # Spectral Proper Orthogonal Decomposition in MatlabSPOD() is a Matlab implementation of the frequency domain form of proper orthogonal decomposition (POD, also known as principle component analysis or Karhunen-Loève decomposition) called spectral proper orthogonal decomposition (SPOD). SPOD is derived from a space-time POD problem for stationary flows https://arxiv.org/abs/1708.04393">[1,2] and leads to modes that each oscillate at a single frequency. SPOD modes represent dynamic structures that optimally account for the statistical variability of stationary random processes.The large-eddy simulation data provided along with this example is a subset of the database of a Mach 0.9 turbulent jet described in [3] and was calculated using the unstructured flow solver Charles developed at Cascade Technologies. If you are using the database in your research or teaching, please include explicit mention of Brès et al. [3]. The test database consists of 5000 snapshots of the symmetric component (m=0) of a round turbulent jet. spod.m is a stand-alone Matlab function with no toolbox dependencies. All other Matlab files contained in this repository are related to the six examples that demonstrate the functionality of the code (see file descriptions below). A physical interpretation of the results obtained from the examples can be found in [4]. The reference for the frequency-time analsyis is https://arxiv.org/abs/2011.03644">[5].spod_adaptive.m is the adaptive sine-taper SPOD algorithm for broadband-tonal flows by Yeung & Schmidt [7]## Download### Using your browserRepository zip file with examples (81.5 MB): https://github.com/SpectralPOD/spod_matlab/archive/master.zipMatlab function only (15 KB): https://raw.githubusercontent.com/SpectralPOD/spod_matlab/master/spod.m### Using Git in the terminalgit clone https://github.com/SpectralPOD/spod_matlab.git## Files| File | Description || ------------- |:-------------|| spod.m | Spectral proper orthogonal decomposition in Matlab | | spod_adaptive.m | Adaptive sine-taper SPOD in Matlab || example_1.m | Inspect data and plot SPOD spectrum | | example_2.m | Plot SPOD spectrum and inspect SPOD modes | | example_3.m | Specify spectral estimation parameters and use weighted inner product | | example_4.m | Calculate the SPOD of large data and save results on hard drive | | example_5.m | Calculate full SPOD spectrum of large data | | example_6.m | Calculate and plot confidence intervals for SPOD eigenvalues | | example_7_FTanalysis.m | Frequency-time analysis || example_8_invspod.m | Band-pass filtering using (inverse) SPOD || example_9_multitaperWelch | SPOD using Multitaper-Welch estimators | | example_10_sineAdaptive | Adaptive SPOD example| | tcoeffs.m | Time-continuous expansion coefficients via convolution || invspod.m | Inversion of SPOD using block-wise expansion coefficients | | jet_data/getjet.m | Interfaces external data source with SPOD() (examples 4-5) | | utils/trapzWeightsPolar.m | Integration weight matrix for cylindrical coordinates (examples 3-6) | | utils/jetLES.mat | Mach 0.9 turbulent jet test database | | LICENSE.txt | License | ## Usage[L,P,F] = SPOD(X) returns the spectral proper orthogonal decompositionof the data matrix X whose first dimension is time. X can have anynumber of additional spatial dimensions or variable indices. Thecolumns of L contain the modal energy spectra. P contains the SPODmodes whose spatial dimensions are identical to those of X. The firstindex of P is the frequency and the last one the mode number ranked indescending order by modal energy. F is the frequency vector. If DT isnot specified, a unit frequency sampling is assumed. For real-valueddata, adjusted one-sided eigenvalue spectra are returned. AlthoughSPOD(X) automatically chooses default spectral estimation parameters,the user is encouraged to manually specify problem-dependent parameterson a case-to-case basis.[L,P,F] = SPOD(X,WINDOW) uses a --------- 📥 Download IT Bot — 下载几乎所有媒体到您的手机或电脑。

📡 MATLAB Central - File Exchange - rating:5.0 | M5Unified Add-On Library for Arduino M5Stack support for MATLABConnect to an M5Stack ESP32 based device using the MATLAB Support Package for Arduino hardware. This Custom Arduino Add-On Library allows you to communicate with the integrated peripherals on M5Stack(IMU,LCD,MIC,PMU,SPKR,etc.) using the M5Unified & M5GFX Arduino Libraries. To get started, you need:MATLAB.ESP32 based M5Stack (Core, Core2, Stick, Stick2,Atom).MATLAB Support Package for Arduino hardware.M5Unified & M5GFX Arduino Libraries installed in the arduino libraries folder.M5Unified Add-On Library for Arduino (this).Connecting to the M5StackOnce the environment is set up, we will create two objects in our workspace. An 'arduino' object that represents the ESP32 microcontroller .An 'addon' object that represents the M5Unified Libraries & the devices M5Unified controls. First: Initialize communication with the ESP32 inside the M5Stack. Example:esp32 = arduino('COM6','ESP32-WROOM-DevKitC','Libraries',{'I2C','M5Stack/M5Unified'});Second: Initialize the M5Unified Arduino Add-On Library. Example:M5Unified = addon(esp32,'M5Stack/M5Unified');Controlling the M5StackUse the 'arduino' object namespace to communicate with the ESP32. Example: esp32.writeDigitalPin('D32',0); esp32.readVoltage('D33');Use the 'addon' object namespace to communicate with the M5Stack components. Example: M5Unified.lcdPrint('Hello');NotesThis Library is in active development and more features will be added over time. Created using MATLAB 2024a, it likely works with any version of the arduino support packages that supports ESP32.Developed using the M5 Core2 for AWS, and some testing with the M5 StickC has been done.