Тёмный

Track time in MATLAB (tic toc functions) 

Engineering with Dr. Kelsey Joy
Подписаться 2,2 тыс.
Просмотров 69 тыс.
50% 1

How to use the tic and toc functions (TIMER) to create a program that times user's input responses in MATLAB.
A full tutorial video can be found at: • How to Track Time in M...
Download an updated version of this script file at: www.mathworks.com/matlabcentr...
Some Notes about MATLAB functions in this code:
tic %start timer count (some time will be added between tic and toc, but it is minimal)
toc %seconds %stop timer and store time elapsed
str2sym() %convert a string of a problem to the answer/solve
#MATLAB #learntocode #timer #time #timing #functions #quiz #stopwatch #trackuser #usertime #timeuser

Наука

Опубликовано:

 

19 янв 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 45   
@RoyMustang.
@RoyMustang. Год назад
My Professor was like " If you don't understand the way I teach , you might as well learn from RU-vid and pass the exams " and I took that literally ☠️ Thanks for the video Mam !
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Thank you Roy! I'm so glad you enjoy my videos! If you come across any topics that I don't cover or don't go over in depth enough, please let me know. I'm always happy to add more! Or if you have a final project for your class, I'm happy to build a video tailored to that. That's where some of my longer problem walk through videos have come from. What topics are you covering now?
@RoyMustang.
@RoyMustang. Год назад
@@EngineeringwithDrKelseyJoy for my final year project, I'm working on using Artificial Neural Network for Image Encryption and Matlab is vital for it , so going through basics once again and working on some errands, Your videos are genuinely so useful and good !
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Your project sounds really exciting! And thank you so much! I really appreciate your kind comments and support! I'm so glad I could help.
@farzadshadi1
@farzadshadi1 2 года назад
Hello I have a flowchart. In one part of which I can turn on a timer at the same time using battery and calculate the time until the battery supply th power to the load, then when th disel is turned on at three different point, the timer will be reset, can you help me how writ the matlab code. Thanks
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 2 года назад
Hi Farzad. I'm happy to try to help. For starters how are you collecting and inputting your data in MATLAB? Are you using simulink? Where are you at in this process? And just to clarify you have all the logic completed in a flowchart, correct?
@farzadshadi1
@farzadshadi1 2 года назад
@@EngineeringwithDrKelseyJoy l have too write with code
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 2 года назад
@@farzadshadi1 do you have to simulate a fake battery within your code then?
@farzadshadi1
@farzadshadi1 2 года назад
@@EngineeringwithDrKelseyJoy Yes
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 2 года назад
@@farzadshadi1 what are you requirements for that? You may want to use rand or randi function to start this.
@viveksharma4480
@viveksharma4480 Год назад
Assembly vs matlab language
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Are you asking about assembly within MATLAB? www.mathworks.com/help/sm/multibody-systems.html Or are you asking about ASM (assembly)? MATLAB is a matrix-based language and not categorized as a low-level programming language. Does that help answer your question?
@viveksharma4480
@viveksharma4480 Год назад
@@EngineeringwithDrKelseyJoy i thought assembly and matlab is different language
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
My understanding of Assembly coding is that it's used for direct hardware manipulation in device drivers, low-level embedded systems, and real-time systems.
@viveksharma4480
@viveksharma4480 Год назад
@@EngineeringwithDrKelseyJoy so I can't make software using assembly ....
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
@@viveksharma4480 wouldn't really make sense. What's your goals? Here's an explanation I found online that states it very well: "In theory, sure. In practice, the problem is the sheer amount of code. Take a look at the size of an application, then realise the average size of the output from a single line of assembly is about three bytes. So, the smallest possible Windows GUI application is probably Minimal OpenGL 3.3 Core Profile Demo, which can be reduced to 4kb of executable (Small, Freestanding Windows Executables). I'm extremely surprised it is possible to make it that small. But that is still 1300 lines of assembly, roughly. To display nothing but a spinning red square. In C it's about a hundred lines (skeeto/opengl-demo). Since the effort of programming has something to do with number of lines, writing that in assembly would be much harder. And, as those pages illustrate, C is pretty close to assembly anyway; C was intended to be just a portable assembly, and pretty much is that."
@praveenkumar-tu1sj
@praveenkumar-tu1sj Год назад
Ca n please post a video of animation of stream plot of contour contains u and v components. Thanks Madam in advance
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Thank you for the idea. I will add this to my list of future videos. For now here is a plotting video where I show some animation in plotting a formula: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-pvHAr57QR8w.html Also here is my plotting playlist: MATLAB Plotting series: ru-vid.com/group/PLmB_c16LoAcX-y8BiQOufPapdeZoBEFi2
@Akash-oo5bx
@Akash-oo5bx Месяц назад
Any good resources for learning..?
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Месяц назад
I have a playlist on RU-vid to help: How to Create Programs in MATLAB (tutorial): ru-vid.com/group/PLmB_c16LoAcWz_5qK1XpBlP0DiD6cgU-r Most of my videos have a link to the script files on MathWorks. Are you looking for something specific?
@-M18
@-M18 Год назад
حرام الحلف بغير الله عز وجل
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Not sure how this is relevant to this video, but thanks for watching and commenting.
@debajyotipatra
@debajyotipatra 5 месяцев назад
You should use a new live script instead of a new script 😊
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 5 месяцев назад
I haven't gotten into live scripts. What do you like about them?
@debajyotipatra
@debajyotipatra 5 месяцев назад
@@EngineeringwithDrKelseyJoy nothing special but it reduces the time
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 5 месяцев назад
@@debajyotipatra nice. I feel like I'm so used to not having live it's been hard to make the switch. I know it's been around for years now. 😂🤣
@nyudoragon1478
@nyudoragon1478 11 месяцев назад
Is there a reason why not so many people don't use Matlab? Is it because mostly engineers use it? Or they don't? I mean, who is the targeted audience of Matlab?
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 11 месяцев назад
It's popular for math courses because the matrix math and the way data is stored. The simulink side is similar to LabVIEW and used more for electrical networks, data acquisition, etc. So it's fairly popular amongst electrical engineers. It's also popular in the aerospace industry - especially Boeing. It's important to acknowledge though that the programming side continues to advance significantly presenting more options/opportunities. I wouldn't be surprised if it becomes more popular as AI and ML applications become more prevalent. What do you think about MATLAB? Do you think more people should use it?
@nyudoragon1478
@nyudoragon1478 11 месяцев назад
@@EngineeringwithDrKelseyJoy thanks for replying
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 11 месяцев назад
@@nyudoragon1478 of course. Thank you for commenting. 😊
@abdultheseekerofknowledge4453
What can Matlab do that Python can't?
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
Thank you for your comment. MATLAB is popular in many STEM communities because it's very matrix-friendly (for efficient computation) and has a wide variety of math libraries. Check out this if you are interested in reading more about MATLAB vs. Python: www.mathworks.com/products/matlab/matlab-vs-python.html
@badbrother_2023
@badbrother_2023 Год назад
Why is this the most hated language
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
I think VBA has MATLAB beat for that. 😂
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy Год назад
There are limitations with MATLAB, but I think it's an excellent tool for data analysis and working with Excel data. Different tools are better for different jobs. If you use screwdrivers to hammer nails, then you'd probably end up hating that tool. If you don't know how to use a tool or use it for a job that it won't be well suited for, then it's easy to start hating that tool. I think that's a big part of it. Or contempt prior investigation some maybe? Why do you think?
@vishant7335
@vishant7335 9 месяцев назад
​@@EngineeringwithDrKelseyJoyhi, I am in finance field should I learn MATLAB or python which will benefit me in future?
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 9 месяцев назад
@@vishant7335 hi. I recommend looking up jobs you are interested in and see what the job descriptions say. If you don't have any particular companies in mind, then I would leave towards MATLAB because the interface with Excel is much cleaner in my opinion. If you are planning on analyzing a lot of Excel it CSV formatted data, MATLAB can be a very helpful tool! What are your current goals?
@vishant7335
@vishant7335 9 месяцев назад
@@EngineeringwithDrKelseyJoy thank you for your advice mam. I am aiming to pursue a career as a financial or investment analyst.
Далее
Matlab Tutorial - 60 - Plotting Functions
9:14
Просмотров 272 тыс.
Simulating the Evolution of Rock, Paper, Scissors
15:00
2-Minute Rule to Learn Coding - Atomic Habits
7:58
Why I NEVER Took Notes While Learning to Code
5:10
Просмотров 54 тыс.
stop doing tutorials. Learn to code like this...
6:49
Просмотров 102 тыс.
Model-Based Design with MATLAB and Simulink
2:09
Просмотров 83 тыс.
What Software do Mechanical Engineers NEED to Know?
14:21
Я УКРАЛ ТЕЛЕФОН В МИЛАНЕ
9:18
Просмотров 110 тыс.
ЗАКОПАЛ НОВЫЙ ТЕЛЕФОН!!!🎁😱
0:28
Acer Predator Тараканьи Бега!
1:00
Просмотров 465 тыс.