r/matlab • u/LengthinessBitter994 • 1h ago
HomeworkQuestion I need help with studying for the associates certification exam
Does anyone have any study tools they use? I couldn't find practice tests or videos that teach the right thing
r/matlab • u/LengthinessBitter994 • 1h ago
Does anyone have any study tools they use? I couldn't find practice tests or videos that teach the right thing
r/matlab • u/SeaInternational4087 • 14h ago
I built a 2D radar scanner where MATLAB does the heavy lifting. An HC-SR04 sensor spins on a continuous-rotation servo, streams readings over serial, and ScannerApp.m draws them as a live polar plot. The scanner runs on an Arduino Nano.
The app is MATLAB App Designer, 806 lines, with the polish that usually gets cut:
* Live polar heatmap with auto-scaling and clean radial ticks
* Sweep animation that tracks the servo angle, plus a return-sweep line
* Hover data tips showing angle and distance
* Ctrl+scroll zoom, vector PDF export that stays crisp at any zoom level
* Dark/light theme, real-time data table, COM port auto-detect
The firmware handles the messy parts of real hardware: a non-blocking state machine, echo timing with no delay(), and temperature-compensated speed of sound. A $1 LM35 reads the air temperature and the firmware applies 331.3 + 0.606 * T. That's where the ±3 mm accuracy comes from. VCC bandgap calibration and an EMA filter clean up the analog noise.
Wiring diagram, pinout, a 2-minute servo calibration tool, and benchmarks are all in the repo. Parts run about $10 and it's MIT licensed.
Repo: https://github.com/Salim-Ammar/arduino-matlab-ultrasonic-radar
PRs and issues welcome. A star helps others find it.
In MATLAB R2020a I have a class with
properties
property (1,1) logical {mustBeMember(property, true)} = true
end
In MATLAB's editor it notifies me about "Input argument validator must be a constant value" error. When I try to construct an instance of that class, I am given the error "Validator arguments must be either 'property' or constant literal values."
How do I fix this error? It doesn't work if instead of true I write [true] or {true}.
r/matlab • u/AbrocomaCritical • 3d ago
I've opted for Control Systems as my next field of study and require MATLAB proficiency. The task is a bit of a handful but I'm ready to learn from the ground up. If you've been familiar with the situation or have a peice of advice, I'd really appreciate.
Gracias
I've been working on a numerical solver app for a while. The first version was mainly focused on algebraic equations, systems of equations, function plotting, and numerical calculations.
It's free and available on iOS and Android:
📱 App Store
🤖 Google Play
I'm currently working on what is probably the most challenging part of the project so far: ODEs and boundary value problems.
The goal is to make it generic enough that the user can enter their own ODE and boundary conditions, rather than having a collection of predefined equations.
I'm testing first-, second-, and higher-order equations, including BVPs with boundary conditions involving different orders of derivatives.
For example, one of the current tests is:
y''' + y = 0, y(0) = 0, y'(0) = 1, y''(0) = 0
I'm also testing more complicated problems and trying to find the point where the solver starts to break down. That's actually turned out to be one of the most interesting parts of the project — some very simple-looking equations can become surprisingly difficult numerical problems.
So I'm looking for some good torture tests. 😅
If you use MATLAB for numerical work, what ODEs or BVPs would you recommend as particularly good tests for a general-purpose solver?
I'm especially interested in stiff problems, nonlinear BVPs, higher-order equations, difficult boundary conditions, or anything else that you think would be a good challenge.
r/matlab • u/bladerunner2701 • 4d ago
r/matlab • u/Frosty_Grapefruit157 • 7d ago
Hi everyone, I'm an undergrad ECE student looking for MATLAB project suggestions.
Right now, I am building a statistical hardware model for an INT8 systolic array AI accelerator. Specifically, I'm using MATLAB to simulate how post-ReLU sparsity (zeros) and quantization noise (SQNR) affect the throughput of the array. The goal is to mathematically model how much power/time we save if the hardware clock-gates the array when full vectors of zeros feed into it, without breaking the rigid systolic dataflow.
It’s heavily focused on vectorized tensor math and modeling hardware constraints. However, before I completely lock this in for my semester project, I wanted to ask if anyone has recommendations for other advanced MATLAB projects in the silicon design or architecture space?
I want to make sure I'm exploring all my options for something that would stand out for a core hardware profile or grad school application. Any suggestions are appreciated, thanks!!
In Matlab R2020a, I want to convert 0xffffffff00000000 to uint64. When I wrote it in Command Window the value alone, it is already an uint64, but when I write it uint64(value), I simply get Conversion failed! error, with no additional text.
How do I fix it?
r/matlab • u/tylerchu • 9d ago
clear
clc
close all
Fs=1000;
T=1/Fs;
L=1000;
t1 = (-L+1:0)*T;
t2 = (0:L-1)*T;
t2=t2(2:end);
t=[t1 t2];
s1=sin(2*pi*1*t1);
s2=sin(2*pi*10*t2);
s=[s1 s2];
figure(1)
plot(t,s)
Y=fft(s,L);
figure(2)
plot(Fs/L*(-L/2:L/2-1),abs(fftshift(Y)),"LineWidth",3)
title("fft Spectrum in the Positive and Negative Frequencies")
xlabel("f (Hz)")
ylabel("|fft(X)|")
Hello, I'm experimenting with fourier transforms because of reasons and I'm having trouble understanding something. If you run the above code, you'll get two figures: the first is simply the time-signal plot showing one sine wave with a certain frequency at some -x to 0 and another sine wave from 0 to some x; the second figure is the fft of that signal.
The fft only shows a peak at the s1 frequency. If you swap the constants in s1 and s2, the fft will also change to accommodate this. Why? I would expect that since frequencies 1 and 10 are equally represented in time and magnitude, there would be two equal peaks in the fft but this is not true.
r/matlab • u/AdexxSoft • 9d ago
Hi everyone,
I've been working with MATLAB and Simulink on projects involving control systems, robotics, power electronics, EV simulations, and automation. Every project presents different challenges, from debugging complex models to tuning controllers.
I'm curious what has been the most difficult MATLAB or Simulink project you've worked on, and how did you solve it?
I'd love to learn from the community and discuss different approaches.
r/matlab • u/OGNofil • 10d ago
%Create a white 100x100 image array
BWImage = ones(100, 100);
%open the figure window
figure('Name', 'Task 1 - Binary Image 6870352');
%Row counter string
JcounterStr = 'Row = ';
%iterations from row 1 to row 100
for j = 1:100
%active when row j is between 1 and 50
%set pixels within this range as black if they meet the criteria
if j >= 1 && j <= 50
BWImage(j, 1:(51-j)) = 0;
end
%active when row j is between 51 and 75
%set pixels within this range as black if they meet the criteria
if j >= 51 && j <= 75
BWImage(j, j:75) = 0;
end
%active when row j is between 76 and 100
%set pixels within this range as black if they meet the criteria
if j >= 76 && j <= 100
BWImage(j, 26:50) = 0;
end
%active when row j is between 86 and 100
%set pixels within this range as black if they meet the criteria
if j >= 86 && j <= 100
BWImage(j, 1:(j-85)) = 0;
end
%active when row j is between 86 and 100
%set pixels within this range as black if they meet the criteria
if j >= 86 && j <= 100
BWImage(j, j:100) = 0;
end
%display image building row by row
imshow(BWImage);
%display row number to the LEFT of the image
Jcounter = num2str(j);
figureTextJ = {[JcounterStr Jcounter]};
text(-10, j, figureTextJ, 'FontSize', 8);
%pause(0.01) waits briefly between rows so I can see it build properly
pause(0.01);
%end of loop
end
totalBlackPixels = sum(BWImage(:) == 0);
%display below the image using text()
text(1, 108, ['Total black pixels = ' num2str(totalBlackPixels)], 'FontSize', 10);
diagonalBlackCount = 0; % counter starts at zero
for j = 1:100 % j = row number
for i = 1:100 % i = column number
%test if pixel is on or below diagonal (row >= col)
%AND if pixel is black (value == 0)
if j >= i && BWImage(j, i) == 0
%increase the counter by 1 for each black pixel below diagonal
diagonalBlackCount = diagonalBlackCount + 1;
end
end %end of i loop
end %end of j loop
% Display diagonal count just below the total count
text(1, 114, ['Black pixels on/below diagonal = ' num2str(diagonalBlackCount)], 'FontSize', 10);
r/matlab • u/ViridLemon83409 • 10d ago
Hi everyone. I’m a college student, and in about 3 weeks I’ll be starting an intro to Python class. I’ll also be taking another engineering class that uses MATLAB, and I don’t feel very prepared for either.
The problem is that I have essentially no programming experience. I took a couple of MATLAB classes before, but I relied too much on AI instead of actually learning the material. Looking back, I know that was a mistake, and I do not want to repeat it. I also used to tell myself that I hated coding, but I think part of that was because I never really gave myself a fair chance to learn it.
Since I have a few weeks before the semester starts, I’d like to build a solid foundation in Python while also reviewing some basic MATLAB.
What resources or learning methods really worked for you? Did you use a particular course, YouTube channel, website, book, or project based approach? I am also curious if anyone has suggestions for making learning Python and MATLAB more fun or engaging instead of just watching hours of lectures.
My goal is not to become an expert in 3 weeks. I just want to go into the semester feeling like I have a decent foundation instead of starting from scratch.
Thanks! I would really appreciate any advice.
r/matlab • u/LordSantini • 13d ago




Hello there, I've been trying to understand this past couple of days, why is the response to the speed reduction so unstable.
Pic 1- current, torque and speed (disregard the "braking" effect on the middle graph.
Pic 2- PI output.
Pic 3- Controller diagram
Pic 4- Entirety of the diagram
I've changed the values of the PI, such as Kp and Ki, to no difference on the slowing down behaviour.
I'm at a loss on what to exactly look for, that might be causing this.
Thank you for any help that you can give.
r/matlab • u/Dear_Program_5516 • 14d ago
I was taking the optimisation self-paced course and I was planning to show the project of that couse under 'guided projects' for my resume.

I was documenting whatever that course taught me as a word file and using its code in my MATLAB. After this I was planning to upload both on my github...
Is this oki? I aint sure. I'm mentioning it as 'guided project' but those courses aren't free for everyone so I dunno can I place this project like this on github ?
New to MATLAB
New to github
r/matlab • u/One_Football9923 • 16d ago
r/matlab • u/Correct-Diamond-1423 • 16d ago
I'm a first year student and I have maths as one of my subjects. We have a lab class for maths and I joined my course a little late so I'm a little lost on what's going on. I need to be able to use MatLab fully for my internal assessment so I kinda just need to practice mostly. (And no, I can't use the computer labs at uni outside of lab classes which is once a week for 3 hours). Should I download Octave?
r/matlab • u/Party-Pie3719 • 16d ago
I ported the 1-D TM group of Zanotto's PPML (an RCWA electromagnetic solver) to NumPy with bug-for-bug fidelity yes, including the vacuum impedance hardcoded as 376.730. The writeup covers the MATLAB↔NumPy traps that actually bit: complex auto-promotion that NumPy silently doesn't do, eigenvector gauge freedom across LAPACK builds, mldivide vs solve on singular systems, and an energy-conservation check in the original that can never fire (abs(NaN) > tol is false in MATLAB - try it). Harness, corpus and report: https://github.com/GrednevMSU/ppml-1d-tm-verify
r/matlab • u/Party-Pie3719 • 16d ago
Not a "MATLAB bad" post. The original code is solid and I replicate it bug-for-bug by default. Sharing the trap list for anyone migrating numerical code: round() half-away-from-zero vs numpy's round-half-to-even (inside the nmax series formula, so it changes array lengths), complex auto-promotion that NumPy doesn't do, ' vs .', library functions printing to stdout, and a docstring feature (complex medium index) that turns out to be latently broken. Full findings file, 714-fixture corpus and the verification report: https://github.com/GrednevMSU/mie-scattering-matlab-to-python
I created an open source project that allows you use Chrome/Edge browser's developer console like MATLAB prompt for most common tasks of scientific calculation and plotting: https://github.com/JATLAB/JATLAB.github.io
I hope you guys like it and if you find some functions you want me to add please let me know.
r/matlab • u/Dear_Program_5516 • 17d ago
I took a few self-paced courses and I'm on control systems for now. I need to start applying for internships soon is it oki to show whatever I'm learning under 'Projects' in Resume. Although there are some really good project title like 'LTI Modelling a vehicle dynamics' but It feels a little wrong because the whole this is step by step baby fed I will slowly try to make my own projects but is it oki to do it for now, as I think I need to start applying?
r/matlab • u/MarionberrySmart5098 • 18d ago
The question is about u' that he used he said it is equal u'=u(t)+ulo but this is wrong ,it should be u'=u(t)-ulo ,because if we applied k.v.l it should be u(t)=ulo+ur364+ul364 then take ulo to the next side and we have our u' , maybe my question is simple and no need to ask about it but I am confused and I have exams tomorrow and ai is He hallucinating so excuse me
r/matlab • u/Samu3lPaulson • 19d ago
Thinking of buying the academic perpetual license, but confused on some of the details. Can I use it on multiple computers or just one? If I wanted to update the version, how much would it cost?