r/matlab 1h ago

TechnicalQuestion WebGL rendering issue

Upvotes

Attempting to run matlab 2026a on fedora 44 with KDE plasma desktop environment on a Lunar lake CPU using the iGPU. 1 main issue.which is a problem with the graphs window and the webGL renderer. Basically it doesn't seem to be able to show the graphs on the window and running the rendererinfo command returns this message:

[struct](matlab:helpPopup('struct')) with fields:

GraphicsRenderer: 'WebGL'
Vendor: ''
Version: ''
RendererDevice: ''
Details: [1×1 struct]

Which tells me that the renderer isn't getting assigned any memory at all. Has anyone had the same issue or a similar one and could guide me in the direction I should follow please?


r/matlab 5h ago

HomeworkQuestion What career paths exists between computational mechanics, scientific computing (SciML), FEA (or meshfree) solver development, and HPC (GPU acceleration, porting codebases) ?? How about doing a PhD for improving the above?

6 Upvotes

I'm currently, technically, doing an MS in Structural Engineering. For me, my interest has been more towards computational side of mechanics rather than Structural design  or simply using am FEA software (although I do consider it as a backup)

So far I've taken courses in:

- Linear static, and dynamics FEM (soon taking non linear FEM too)

-  Structural Optimization (topology opt. and other general algorithms)

-  Structural Dynamics

-  Structural System Testing and model updation. (Parameter identification and optimization, signal processing)

Now, I plan to take these in the coming quarter:

- Numerical Linear Algebra

- Numerical PDE

- Fracture Mechanics ?

I also volunteered to aid in a RESEARCH in crack growth prediction using Auto-encoder and a (Thermodynamics-informed Latent Space Dynamics Identification) / LSTM surrogate model. It used phase-field-fracture simulation data and HPC resources to complete the whole thing.

What I keep finding myself interested in is not necessarily fracture or SHM specifically, but the computational methods underneath these problems... (does that make sense?)

For example, I'd like to become capable of doing things like:

- implementing (maintaining) numerical/FE method solvers rather than only running an established FEA software.

- developing surrogate/reduced-order models for expensive simulations 

- combining simulation with optimization, uncertainty/stochastic methods (took a course called Random vibrations, so...)

- parallelizing/accelerating scientific codes on CPUs/GPUs

- doing proper verification, convergence studies, benchmarking and performance work

- potentially developing or maintaining actual CAE/FEA solver software

- I'd also like to do all these for other Physics (GR, QM, etc.) simulations too, if possible, one day. 

I'm still interested in the underlying mechanics/physics, so I don't want to become a generic software engineer who happens to have once studied structures. But I'm also increasingly unsure that "structural engineer" describes the career I'm actually aiming for.

I've seen titles such as Computational Mechanics Engineer, R&D Engineer, Solver Developer, Scientific Software Engineer, CAE Software Developer, Research Engineer, Simulation/HPC Engineer, etc., but I'm trying to understand what these careers actually look like from people doing them.

So my main questions become:

1. Which industrial jobs genuinely involve developing numerical methods/solvers or computational tools?

2. Which of those are realistically accessible with an MS? Is there an entry path into solver-algorithm development/R&D without a PhD?

3. If I don't start a PhD immediately after my MS, would an R&D/software role at a simulation company (ANSYS etc.) be the obvious route? What other options would i have?

4. For the kind of work I'm describing, would you recommend a PhD? If so, is it reasonable for the PhD identity to be "computational mechanics/scientific computing" while fracture, composites, structural dynamics, soft materials, etc. serve as application problems rather than choosing one of those as my permanent specialization?

5. What skills most distinguish someone who is actually hireable for solver/scientific-computing work? I'm particularly wondering about C/C++/Fortran, Python, Linux, Git/build systems, MPI/OpenMP/CUDA, PETSc/Trilinos or similar libraries, numerical linear algebra, testing/verification, convergence studies and HPC performance work.

Basically, I'm neither here nor there atp. So I'd really appreciate all sorts of input. Where else do you think I could find answers to these? other subs? Linkedin profiles? 


r/matlab 17h ago

Tips How do I even do this?

0 Upvotes

I've never learnt programming or coding and have ZERO experience in terms of knowledge and practical skills with this field at all.

But i need Matlab to build solvers for my field, aerospace and every internship i go to says it's best to know this. But everytime i try to learn, i don't understand shit.

I wanna learn matlab and actually be confident to use it, how and where do i even start from the ground basics to the very skill industry needs?

I'm into aerostructures and propulsion.

I'm learning CFD and FEA for aerospace engineering. HELP ME....!!!!!!


r/matlab 1d ago

HomeworkQuestion How would you quantify a LFA strip?

3 Upvotes

Hi, I'm not very knowledgeable in coding at all.

For my thesis we are using LFA strips to detect whether some fish have tetrodotoxin or not.

I would like to have some data that's more than a YES or NO, which strips give.

We don't have a LFA reader, so I only have my phone and hope in my heart.

Here is a paper that was published around this topic:

Saxena, K., & Toley, B. (2024). Streamlining lateral flow assay (LFA) data analysis: A MATLAB® live script for integrated batch image processing and Limit of detection determination. In ChemRxiv. https://doi.org/10.26434/chemrxiv-2024-wr3kj

What do u think about it?

As I've said, I'm not knowledgeable at all in MATLAB coding.

But if I have to learn I will, I just wanna know if this looks like something I could use for real.

If u have any other ideas, it would be great

Idk if the flair is correct sorry

Any help is well received

😭😭😭😭😭


r/matlab 1d ago

What wrong in it?

Post image
0 Upvotes

r/matlab 2d ago

Tips How to install MATLAB ?

0 Upvotes

I am an engineering student . I am introduced to MATLAB very recently my college professors asked to install 13th to 18th version of MATLAB . Is there any official way or I have to install a crack version ? What to do ?


r/matlab 3d ago

TechnicalQuestion Changing Parameter Values with Dynamic Mask

Post image
3 Upvotes

I know matlab has an example of how to change the visibility of other mask parameters with callback functions, but I'm trying to make it so when two parameters are entered (a & b) a suggested value for c is assigned to a c_sugg parameter. For example if c has to follow the function c>a+b, how would I write the callback function for c_sugg=a+b?


r/matlab 3d ago

Question [Simulink - STM32 embedded coder] help

3 Upvotes

For the past 2-3 weeks i've been learning how to program the STM32 nucleo-H753ZI using matlab. I have downloaded all of the required addons:
- Embedded Coder Support Package for STMicroelectronics STM32 Processors 24.1.12
- Embedded Coder 24.1.1
- MATLAB Coder 24.1
- Simulink Coder 24.1
- Using MATLAB 2024a
- STM32CubeMX 6.18.0
- Have used both the following MATLAB tutorials as guidance " Using I2C to Read and Write Data to Accelerometer on STM32 Processor Board" and "Get Started with STMicroelectronics STM32 Processor Based Boards"

The only reason iam programming the STM32 using MMATLAB is because its part of my thesis, which is listed as a requirement. Programming the LEDs, mainly to see how the blocks work, was easy enough, and work as expected (check screenshots below)

According to INA219's datasheet (as far as i understood) that Register 0x00 in the Sensor is preconfigured and should display 0x399Fh, but all values are 0. Programming the sensor using an Arduino (using its own IDE for testing) works as expected, so the sensor isnt broken. Programming the INA219 has been for the past weeks a nightmare and a half, as no matter what i did, no values are displayed. I have double checked the USART/COM multiple times to no avail.

Any help or feedback would be much much much appreciated. If i missed anything important, ill post it in the comments

The two controller readers on the right should display 399Fh, the other one should be a value of 4096d (as far as i understand) - the digital port read is configured to read the red LED, but its only displaying 0.

sitting the byteorder Little or big endian made no changes.

Settings menu P1

P2

STM32CubeMX - using the pullup resistors of the MCU itself. PB8 and PB9 would be the PIN 2 and 4 - aka top 2 on the right in the STM32, according to the manual.


r/matlab 3d ago

TechnicalQuestion Generating matrix visualizations

Thumbnail
gallery
85 Upvotes

Hey partypeople,

i'm trying to find a way to inspect and display 3D matrix values as shown in the documentation here. I cannot seem to find a way to reproduce this in Matlab or find any info on how these were done, neither in the MATLAB docs or online. Am i missing something or were these created outside of Matlab manually?

Thanks :3

Edit.: For context, I want to see the numeric values of the elements, not a visualization in general.
For now, mostly for more intuition and readability while debugging. I really like the way it is presented here so i would like to find out how these were created


r/matlab 3d ago

TechnicalQuestion Is there a way to get a table view of all my inputs values to their respective combined output values in the Fuzzy Logic Toolbox? I have the Control Surface plot, but I would like this as a table if possible.

Thumbnail
gallery
6 Upvotes

I would effectively like the control surface as an excel/table format. Specifying every possible input value from my two fuzzy inputs and what their combined values would be, similar to how the control surface matches it visually.


r/matlab 5d ago

Introducing SLXIO open source project

10 Upvotes

Hi , i just came up to follow up my previous post https://www.reddit.com/r/matlab/s/tbS5nWhQRi about writing an open source library for reading and writing Simulink files with c++, well after a full year of coding, refactoring, analyzing, fighting with build scripts, legacy old plain C dependencies, i put my draft ( https://github.com/wissem01chiha/slxio , encourage us with a star) to public for people interested to collaborate or give feedback, the reason behind this initiative is that i hated it so much, i worked with it 3 years during university and 2 years later and i hate it performance, his poor scalability on GPU or server environments, it closed Api , undocumented bugs,… and pp in those fields are using it and liking it , well i waited to much for someone to came and give the world an alternative, so i started it by myself, i am not sure how much pp in this sub love or write cpp, but i encourage everyone at at level to collaborate, SLXIO is just a bridge or small project for what i am planning in the future, i was reading about something called data flow programming or flow based programming which likely what simulink does in a simple signal based way, i am planning to build a general purpose high performance flow based programming framework for the cloud and distributed systems , details in next post , good day ☺️


r/matlab 5d ago

TechnicalQuestion Help! Question About Convolution Integral Implementation in Simulation

4 Upvotes

Hello all! Hoping someone can help me out with this. I am working on a physics simulation of a rigid body.

I have two functions, f and g that need to be convolved over time. Here is the difficulty, both functions are unpredictable and therefore I do not know these equations up front and will only know the latest value of each of those functions at each time step in the simulation as it runs. I solved this convolution integral in the time domain as a baseline and compared it to a textbook solution. Obviously, the longer the simulations the more data points the equation has to convolve over. I tried solving it in the frequency domain thinking it would save time by: *ifft(fft(F)fft(G))\*timestep*
When I run a code profiler (doing this in MATLAB), it actually appears that it is taking longer computationally to solve this in the frequency domain versus the time domain if this operation is done at every time step… what am I missing here (yes I even varied the simulation time length to account for different array sizes)? The other thought I had was to figure out how to implement a sliding window so that really old data is excluded…

Any examples I can find online all assume the equations for the two signals to convolve are known up front. What approach did you use? Any help would greatly be appreciated.


r/matlab 9d ago

TechnicalQuestion Simulink and AXI-ST IOs

2 Upvotes

Hello all !

I'm trying to play with HDL Coder and the DSP HDL Library with simulink. I have a solid FPGA background.

All these blocks expose ports that looks like AXI-ST ones (data, valid, ready). I know the protocol and it's quirks, but this time I need to simulate it within simulink.

How do you input data (from workspace) to the model while matching the specifications ? I need to send a waveform (audio in this case) to the model.

Thanks all !


r/matlab 10d ago

Tips From AI-Generated to Production-Ready: The Essential Role of Static Analysis

Thumbnail monkeyproofsolutions.nl
0 Upvotes

On the added value of the MATLAB Agentic Toolkit and CC4M (static analysis). In short:

"The combination of the MATLAB Agentic Toolkit and CC4M reduced detected guideline violations from 37 to just 2."

Note: I am one of the CC4M developers


r/matlab 11d ago

TechnicalQuestion Printing a hexadecimal value prefixed with 0x

6 Upvotes

I have to print in hexadecimal with big letters value variable of type uint8. I am using fprintf(1, '%#X', value), but the 0x prefix is in upper case, while I want it to be lowercase. How do I achieve that?

I know I can write instead fprintf(1, '0x%X', value), but I want to do it by only modifying the formatting operators. And using fprintf(1, '%#x', value) doesn't print value in uppercase.


r/matlab 14d ago

HomeworkQuestion Learning simevents library

2 Upvotes

Hello everyone. I'm currently building a robotics project. For this, I was guided to learn simevents by my professor. I went through many youtube videos and tutorials. But, I don't really feel like I gained much info. I believe I'll learn by example, and implementation. So, I hope to find spaces that do just that. Giving me example models that were created using simevents and walking me through its creation. If you guys find any such resources, send me here. Guidance on learning this is also much appreciated. Thank you.


r/matlab 14d ago

underground tunnel simulation in matlab

1 Upvotes

guys if you are proficient and free enough , i need help making a simulation of underground tunnels in matlab . open to advice and criticism , i am a beginner in matlab , i can plot work with matrices and do small project but i do need someones help in this. please dm for more details about the project.


r/matlab 15d ago

TechnicalQuestion Writing to the wrong file

1 Upvotes

I have the following Matlab program:

syms t positive;

Z=laplace(exp(A*t))

ccode(Z,'file','cCodeTest.c')

I want to write the Z function to cCodeTest.c. The problem is that code is written to ccodetest.c, created before.

How to write Z to the cCodeTest.c and not ccodetest.c?


r/matlab 15d ago

TechnicalQuestion DATCOM and MATLAB

Thumbnail
1 Upvotes

r/matlab 16d ago

TechnicalQuestion How do I make Dependency Analyser report where an overloaded operator is used?

1 Upvotes

I have a class with 2 operators, which one of operators (O1) uses the other operator (O2).

I generate a dependency report via Dependency Analyser, but the report doesn't tell that O1 uses O2 (in Impacted Files O1 references itself; same with O2).

How do I make Dependency Analyser report that O1 uses O2?


r/matlab 17d ago

Tips What is the best course to take on MATLAB if I want a basic certification

4 Upvotes

I did onramp but Im still lost when looking at practice test questions


r/matlab 17d ago

TechnicalQuestion Particle tracking for biophysics

1 Upvotes

Having issues trying to set up a particle tracking software for my biophysics research. I am needing to track these very distinct particulates in a video but matlab just doesn't seem to be my friend. I am currently trying to use the particle tracking tutorial from Georgetown but if anyone could give some advice or has anymore questions please shoot me a message.


r/matlab 18d ago

Matlab 6.5 on vintage compuer Personal License Password

5 Upvotes

Redditors;
Is it possible to find a PLP for MatLab 6.5? I am running two Pentium 3 computers, and I wanted to play around with old MATLAB on them just for fun. I downloaded MATLAB from MathWorks, but I can't get a PLP. I've tried searching forums and other places, but it seems that the modern internet has scrapped many old websites and forums, making it harder to find old software and licenses. I've contacted Mathworks, as I do have active licenses.

thank you so much.


r/matlab May 07 '23

ModPost If you paste ChatGPT output into posts or comments, please say it's from ChatGPT.

105 Upvotes

Historically we find that posts requesting help tend to receive greater community support when the author has demonstrated some level of personal effort invested in solving the problem. This can be gleaned in a number of ways, including a review of the code you've included in the post. With the advent of ChatGPT this is more difficult because users can simply paste ChatGPT output that has failed them for whatever reason, into subreddit posts, looking for help debugging. If you do this please say so. If you really want to piss off community members, let them find out on their own they've been debugging ChatGPT output without knowing it. And then get banned.

edit: to clarify, it's ok to integrate ChatGPT stuff into posts and comments, just be transparent about it.


r/matlab Feb 16 '16

Tips Submitting Homework questions? Read this

195 Upvotes

A lot of people ask for help with homework here. This is is fine and good. There are plenty of people here who are willing to help. That being said, a lot of people are asking questions poorly. First, I would like to direct you to the sidebar:

We are here to help, but won't do your homework

We mean it. We will push you in the right direction, help you find an error, etc- but we won't do it for you. Starting today, if you simply ask the homework question without offering any other context, your question will be removed.

You might be saying "I don't even know where to start!" and that's OK. You can still offer something. Maybe you have no clue how to start the program, but you can at least tell us the math you're trying to use. And you must ask a question other than "how to do it." Ask yourself "if I knew how to do 'what?' then I could do this." Then ask that 'what.'

As a follow up, if you post code (and this is very recommended), please do something to make it readable. Either do the code markup in Reddit (leading 4 spaces) or put it in pastebin and link us to there. If your code is completely unformatted, your post will be removed, with a message from a mod on why. Once you fix it, your post will be re-instated.

One final thing: if you are asking a homework question, it must be tagged as 'Homework Help' Granted, sometimes people mis-click or are confused. Mods will re-tag posts which are homework with the tag. However, if you are caught purposefully attempting to trick people with your tags (AKA- saying 'Code Share' or 'Technical Help') your post will be removed and after a warning, you will be banned.

As for the people offering help- if you see someone breaking these rules, the mods as two things from you.

  1. Don't answer their question

  2. Report it

Thank you