Main Content

Results for


Two fun community contests: MATLAB Mini Hack 2022 and Cody 10th Anniversary will start on Oct 3rd, 2022. Are you ready for the challenges and big prizes?
How to Play
1. MATLAB Mini Hack 2022 contest:
Use up to 280 characters of MATLAB code to generate an interesting image. New in 2022 contest: You'll be allowed to use functions from File Exchange entries and/or certain MathWorks toolboxes in different weeks.
2. Cody 10th Anniversary contest:
Solve at least 1 Cody problem per day during the 4-week contest period. We will reward participants with the longest streak of days of problem-solving!
Tips to Win
1. MATLAB Mini Hack 2022: Spend time creating your best work (either a new or remixed entry).
2. Cody 10th Anniversary: Make sure you start on the 1st day (Oct 3rd). This is the key if you want to win one of the grand prizes (worth marking your calendar?)
3. Act now: No matter if you want to join either the Mini Hack, Cody, or both. Start planning your strategy today.
Good luck! We hope you are the winner.
Hello Academia,
I've been trying to get information regarding these configuraitons in a 3 phase transformer. The first is a dual secondary consisting of a wye output and delta output. Both feed separate 3 phase bridges, which outputs are connected in parallel.
The second is a Wye output, which each leg feeds 3 more series windings, which are located on the adjacent core (phase shifted) on the same transformer, with only one 3 phase bridge for the output
I see there is a zigzag simulink but can't seem to get that loaded...
My question is, are these essentially identical in operation, or is the dual secondary what I should be using? (due to better harmonic rejection)
Thanks,
Bryan
Hello,
I am designing a battery model and its control to undergo cyclic charge and discharge.
The battery model is created by using a simscape electrical battery block (Table-based).
The control is modeled using Stateflow. The statflow chart takes SOC values as inputs and provide current values as outputs. By default, the battery will be at rest and no current is drawn at that state (I=0A). And then based on the SOC % of the battery, it goes to charge (3A current) or discharge (-3A current) state. I have defined the controls as follows.
  • If the battery has SOC >= 50%, it has to discharge. If the battery has SOC < 50%, it has to charge.
  • While discharging, if the battery reaches 0% SOC, it goes to rest.
  • While charging, if the battery reaches 100% SOC, it goes to rest.
I have defined initial SOC as 50%.
When I run the simulation, the battery started to discharge as per the condition provided in the stateflow chart.
I = -3
But the battery has not come to rest state after reaching 0% S0C.
I am getting a warning that,
At time 1944.017100, one or more assertions are triggered. State of charge must be greater than or equal to zero. The assertion comes from: Block path: Example_cell_model/Battery (Table-Based)1Assert location: o (location information is protected)
I don't understand why the battery has not came back to rest state.
Do anyone has any idea for the cause of this problem and how to resolve it?
Thanks in advance.
I need to model temperature rise of a resistor due to joule heating with a variable supply or a variable resistor. Is there a simulink component that can be used for this or it has to be implemented with the physical equations fed into block diagrams?
Can someone help give an idea of how this can be modeled?
I'm trying to simulate EV drive system using FEM PMSM and IGBT block of simscape electrical.
The simulation results (magnitude of the current in time domain) is quite similar with the experimental results.
But in frequency domain analysis using FFT (fast fourier transform), amplitude of current harmonics(specially 5, 7 th of fundamental frequency) are way to different.
Is there any way that I could increase my simulation accuracy?
I am trying to simulate a single phase H-bridge inverter connected to a load in Simulink using Simscape Electrical (blue wire). The simulation does not work. I tested the same circuit (with black wire). And everything works fine. I looked hard, I can't see any reason. Does anyone know why or have any examples?
You can find the simulation files in the attachment.
My goal with this is to start with a basic inverter scheme before testing multilevel converters. I had started with that but I had problems from the beginning...
Thanks in advance

hello can some body help me regarding designing a project in simulink to estimate the state of health of a battery ?... including kalman filter .... at least i need the battery cell equivalent circuit in simulink and the idea of the estimation method

many thanks

I am trying to simulate a 3 phase induction motor on Simulink by using its dynamic model. This is the information in its datasheet:
It also has 4 poles and J = 0.0117 kgm², star connection. After calculate parameters, I get these values:
Lm = 0.176 H; Rr=Rs = 0.613Ω; Llr=Lls = 0.00669 H.
Also in the datasheet, they said that the output torque = 705 Nm at speed 35 rpm, but the model cannot reach that value. The simulation motor run backward if applied torque greater than 70 Nm ( at about 1200 rpm). But in reality, this motor can withstand 705 Nm, I have seen it run.
Can someone help me with this problem? Thank you
Hi,
I have two DGs and I want a secondary control between these two DGs using mpc toolbox. I don't know where I am going wrong with it. it is not working. when I am trying to change the load the frequency is still the same. Can anyone please help?
Thanks
Hullo Everyone. I have published a video on the MathWorks YouTube channel that explains active, reactive and apparent power. It is less than 9 minutes and so can be viewed over a coffee break. Here's the link https://www.youtube.com/watch?v=DCUwK6AfzcM
Hi,
I am using matlab fuction block to calculate duty ratio for a MOSFET . How do I incorporate time delay in the calculated duty cycle. Duty cycle of S3 should be delayed by d1 in the picture.Kindly help

I have a datasheet of an induction motor (as figure below). I want to simulate it on matlab/simulink, but I don't know it's parameters (Lls, Llr, Lm, Rr, Rs).

I tried to search about open circuit test and blocked rotor test to determine these parameters, but some of information doesn't appear on datasheet and I don't have the real motor to test on it (datasheet is only think I have).

Could someone help me with this?

Assignments, quizzes, midterms, finals, grades, joys of success, the anxiety of low grades. Sounds like a typical cycle that students go through, right? Sometimes, all that hustle and bustle makes students forget that coding could be fun! Dr. Amin Rahman teaches AMATH 301 at the University of Washington. Many engineering students take this course and learn MATLAB in the course. He was looking for ways to keep students engaged and remind them that coding is fun. To achieve this goal Dr. Rahman and I set up a small competition in MATLAB Grader. Dr. Rahman selected several problems from MATLAB Grader problem collections. Students competed in this optional competition without the pressure of grades. They submitted their solutions; their submissions were automatically graded using MATLAB Grader and they got instant feedback. Green checkmarks for the correct answers empowered students and gamified coding. With the feedback they got, they continuously improved their code.

Prizes? Aside from the joys of coding in MATLAB, students won MathWorks-branded items like t-shirts, hats, and bags and proudly wore them as you can see in Dr. Rahman’s tweet.

Interested in using MATLAB Grader? Interested in accessing MATLAB Grader problem collections? Like to brainstorm ideas to make coding more fun? Reach out to us! We are here to help. Any creative ideas to make courses more engaging? Please share your ideas with this community!

Antonello Zito
Antonello Zito
Last activity on 13 Jan 2025 at 22:38

This is not a question, but a point of discussion for the entire community. I am aware that every 1/2 months this theme comes out, but until this is not fixed it is totally necessary that this comes, indeed, out. And I said "fix" because Mathworks has to understand that a dark theme is not only a visual/aesthetic matter, it is a substantial part of the game. Most of the OS, GUIs, programs are actually in dark mode, and a vast majority of the users makes indeed use of a global dark mode. How much one does like it is personal, but the benefits to power savings and eye health is instead a fact. Mathworks being ignoring this for years is nothing but ridiculous. Of course it is not an easy task, but every minute of committment for it is worthy. And nope, Schemer is not helpful because it does not provide a real fix to this question.
I feel free to suggest something similar to the Spyder's dark theme, which came out like 2 years ago if I remember correctly.
Of course, my point is not being disrespectful (I am instead very respectful to the huge efforts of Mathworks for making this wonderful program run). But, form a user's point of view, the fact that not a single word has so far come out from Mathworks about a dark theme (meaning that for sure we will not see it in a timing of months) requires us to put a strong pressure on this.
Mathworks, please: it's time for a dark theme.

If you are interested in live script lecture notes in the following areas, take a look at the short course ( Advanced MATLAB for Scientific Computing ) developed at Stanford. You can also download the required data for the examples from the course GitHub page.

  • MATLAB Fundamentals
  • Graphics and Data Visualization
  • Efficient Code Writing
  • System and File Manipulation
  • Big Data Handling
  • Numerical Linear Algebra
  • Numerical Optimization
  • Symbolic Toolbox, ODE, and PDE
  • Statistical and Machine Learning
  • Deep Learning
  • Object-Oriented Programming
  • Using MATLAB with Other Programming Languages
  • Image Processing, Computer Vision, and Image Acquisition
  • Signal Processing, Audio, and DSP System

In many universities, introductory programming is taught as a foundation course. Students from different departments are usually brought together to learn to program in these foundation courses. Their home departments may have a programming language preference and that preference may change from department to department. Some universities either strictly teach one language in a single course, some of them teach multiple languages in the same course and give students the flexibility to choose their language for the assignments and projects. How can we make students multilingual when it comes to programming? Is there a way to teach multiple languages in a fair light, side by side without creating a new course or sacrificing one language to teach the other one? Dr. Nathan Kutz from the University of Washington found a creative way to teach MATLAB and Python side by side in his AMATH 301 course. This course is an introductory programming course at the University of Washington and almost all engineering students take it. Do you wonder how Dr. Kutz taught this course? Check out these recordings and course resources! They can be utilized in an in-person or a distance learning setting:

Are you looking for ways to keep your students engaged in a virtual setting? Would you like to spice up your courses with hands-on projects? Using Arduino Engineering Kit, you can achieve these. Due to COVID-19, many instructors started to look for creative ways of giving students a lab experience. Some of them chose to create virtual labs, some of them designed hardware projects with low-cost hardware or integrated hardware projects kits to their curriculum. If you are interested in how Dr. Azadi from San Francisco State University used Arduino Engineering Kit during the pandemic to teach his Mechatronics course, check out these articles:

I need to model a brushless motor for which I only have the data of voltage, power, speed, nominal torque, starting torque, max current and total weight, which moves a bicycle. I have studied the Permanent Magnet Synchronous Machine power_pmmotor Simulink example, but I do not have all the required data. My question is whether it is possible to make an approximate model with my few data. I guess some data could be assumed, but I don't know what typical values ​​would be correct. I would greatly appreciate any suggestion. My best regards.

Hi,

I am new to Matlab and looking to model complete EPS system starting with battery modelling. I have seen videos where the modelling is explained but looking for a one which can teach me from the scratch.

Hi, currently I'm studying about DC-DC Boost converter with controller. After I applied the step time, the output voltage supposed to follow the step time, but there is some delay in the simulation results after I applied the "step time" in the step input block. Can someone help, why this delay occur? Please see the attached pictures. Thanks