What would be the best way to learn matlab?

  • MATLAB
  • Thread starter DrDanger
  • Start date
  • Tags
    Matlab
In summary: WarrenYou are using a Pickit device to connect your PIC to your computer. This is a common way to do it. Once you have the Pickit device connected, you can use MATLAB to program the PIC. There are a few functions you should know, such as "if." You can use this function to test conditions. For example, if you shine a light on one of the sensors, MATLAB might change the output of the PIC.
  • #1
DrDanger
44
0
What would be the best way to learn matlab? what should I learn first? I plan on using it to program and solve physics/math problems and hopefully some other stuff. Is knowing c c++ or any other programming language necessary to learn matlab? also what are some things you use it for? thanks!
 
Physics news on Phys.org
  • #2


The best way to learn a programming language is to obtain small examples (less than 20 lines of code, or so, and if you're new to programming, keep it down to just a few lines) and try making changes in them to see what happens. Be sure you well understand the purpose of the example, or playing with it will only confuse you! Its nice to pick examples that output graphics because they're more fun. No, you shouldn't learn some other language first. I've also messed around with SciLab, which is free. SciLab syntax and common library calls are a bit different from matlab.
 
  • #3


Have you read the Getting Started portion of the MATLAB documentation?

- Warren
 
  • #4


chroot said:
Have you read the Getting Started portion of the MATLAB documentation?

- Warren


just started. Learning about matrices right now
 
  • #5


okay, so i read the getting started and took a few notes, but am still a little lost. I can graph stuff pretty good and mess around with matrices. I still can't figure out how to program or how to start. I need to write a program for a robot that will make it move and follow a line using light sensors.
 
  • #6


DrDanger,

You really need to read the documentation. There's a section called "Getting Started," which you apparently have found. Below it is a section called "Programming Fundamentals."

As far as your robotics projects, you have perhaps bitten off more than you can chew.

- Warren
 
  • #7


You're probably right. so where would be a good place to start? or good books to read?
 
  • #8


The documentation would be a good place to start. If you have specific questions, we can help you with them.

- Warren
 
  • #9


Okay thanks. I will try to be specific, but you have to understand I have been doing this for about three weeks so my vocabulary on the subject and knowledge of it is poor. Okay so here is the deal I am using a PIC processor(20 pin). I have on it two light sensors that were given to me by a professor. They are plugged into 1 pin called ra2 or ra0 can't remember. I think I am going to change this and plug them into their own pins. I guess my questions would be as follows: I know how to make it move ( i think ) but i don't know how to start it, what i mean is there are two motors each connected to a pin. in MATLAB how do i control these pins? do i give them a name or do they have one already? I read about variables, else, if, for, while, and a few other functions a little bit. In order to make it run i set both wheels to 1 right? and to make it stop i set them to 0? For the light sensors i think I am going to make it where if you shine light on one it turns right and for the other it turns left. so i guess i would use an if and say if light >20 then do this? am i on the right track?
 
Last edited:
  • #10


We have no idea how your circuit is wired up, nor how you're connecting MATLAB to your PIC, so there's no way we can be of any help. Also, why are you talking to us instead of your professor? You are paying him to answer all of your questions to your satisfaction, and it sounds like you need to ask him for an appointment to get additional help. Are you at least attending his office hours?

- Warren
 
  • #11


He is in india, and he is not my professor, he is just a professor lol if that makes any sense. I am using a thing called pickit or something like that. basically it has six prongs that connect into my circuit where there is a six pronged piece, then there are wires going from that to the chips. then i connect to my laptop via usb. I can upload pics if that will help any.
 

1. What is the best way to get started with learning Matlab?

The best way to get started with learning Matlab is to first familiarize yourself with the basic syntax and commands by going through online tutorials or taking a beginner's course. Once you have a basic understanding, try practicing by working on small projects or coding challenges.

2. Is it necessary to have a strong background in programming to learn Matlab?

While having a background in programming can certainly be helpful, it is not necessary to learn Matlab. The language has a user-friendly interface and a lot of built-in functions, making it relatively easy to pick up for beginners.

3. How can I improve my skills in Matlab?

The best way to improve your skills in Matlab is to practice regularly and work on challenging projects. You can also join online forums or attend workshops to learn from other experienced users and expand your knowledge.

4. Are there any resources available to help with learning Matlab?

Yes, there are many resources available to help with learning Matlab, such as online tutorials, video courses, and official documentation from MathWorks. You can also join online communities and forums to connect with other users and seek help when needed.

5. How long does it take to learn Matlab?

The time it takes to learn Matlab can vary depending on your previous experience with programming and the amount of time you dedicate to practicing. However, with consistent effort and practice, you can become proficient in Matlab within a few months.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
22
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
712
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
11K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top