top of page

Getting Started with MATLAB

Feb 17
1 min read

This is a short introductory tutorial designed to provide a brief overview of fundamental MATLAB concepts, including basic arithmetic operations, graph plotting, scripts, and user-defined functions.

The tutorial intentionally incorporates common mistakes to expose students to typical error messages, helping them develop the ability to interpret and debug MATLAB code effectively.





Broken on Purpose: Can You Rescue This MATLAB Plot?


The following code is intended to generate a plot of an exponentially decaying sinusoid, similar to the one shown in Figure 1. However, the script contains three deliberate errors and will not execute correctly as written.


t = linspace(0, 10, 1000);

y = exp(-0.3*t)*sin(2*pi*t);

plot(y, T)

grid on

xlabel('Time')

ylabel('Amplitude')

title('Damped Oscillation')

Your task is to identify and correct the errors so that the code runs successfully and produces the graph shown in Figure 1.


Figure 1: The desired graph
Figure 1: The desired graph


Curious to learn more about MATLAB? Let us know in the comments what you would like us to cover next.


 
 
 

119 Comments


Owen Kim
3 days ago

The subject of learning through imaginative preschool play feels more interesting when there is room for a reader to stop and ask their own questions. Inventing a story together gives children room to experiment with language and ideas. It gives me a more concrete starting point for thinking about imaginative preschool play. I can imagine different answers depending on the situation, so I would want to understand the context before drawing conclusions. How can adults support imaginative play without deciding every detail?

Like

Casey Silva
4 days ago

Considering making online counselling easier to approach, I keep coming back to the difference between knowing about an idea and putting it into practice. Knowing how a first conversation works can reduce uncertainty about asking for support. It gives me a more concrete starting point for thinking about online counselling information. A short discussion of an everyday example would make this easier for me to connect with, especially as someone still learning about the subject. What practical information should be available before someone books an online session?

Like

Quinn Rossi
4 days ago

Thinking about applying business training to everyday work, I find the smaller practical questions more interesting than a quick conclusion. A useful training exercise should connect a new idea with a situation people actually encounter. That is the kind of detail I would keep in mind while exploring practical business training. I do not have a settled view yet, but this seems like a good place to slow down and look more closely. How would you check whether a workshop changes behaviour after it ends?

Like

Sofia Tran
4 days ago

I can see why making personal safety education age appropriate would invite discussion, since different people will bring different experiences to the same question. Clear language about boundaries makes an awkward subject easier to discuss respectfully. It also gives the phrase personal safety education a clearer meaning than a label on its own. I am more curious about the process than a polished result, because the steps in between are usually where questions appear. How can lessons about personal safety remain understandable at different ages?

Like

Sofia Nguyen
4 days ago

When it comes to developing practical technical skills in Chodziez, I would rather understand one useful detail properly than rush through a long list of ideas. A practical task often reveals gaps that a written exercise leaves unnoticed. For me, that is a useful way into the broader subject of technical education in Chodziez. The part I would like to explore further is what happens when the idea meets a real situation with its own limitations. How would you connect workshop practice with the theory taught in class?

Like

©2022 by Systems and Control Engineering in Action. Proudly created with Wix.com

bottom of page