What would be the best way to learn matlab?

  • Context: MATLAB 
  • Thread starter Thread starter DrDanger
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary

Discussion Overview

The discussion centers around the best methods for learning MATLAB, particularly in the context of programming and solving physics and mathematics problems. Participants explore various resources, approaches, and challenges faced by a learner who is also working on a robotics project.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant suggests starting with small code examples to understand programming concepts, emphasizing the importance of modifying examples to see their effects.
  • Another participant questions whether prior knowledge of other programming languages is necessary, concluding that it is not required.
  • A participant mentions their current focus on learning about matrices and expresses difficulty in programming, particularly in relation to a robotics project involving light sensors.
  • There are recommendations to read the MATLAB documentation, specifically the "Getting Started" and "Programming Fundamentals" sections.
  • One participant expresses concern that the robotics project may be too complex for the learner's current skill level.
  • Another participant asks for guidance on controlling motors and light sensors using MATLAB, outlining their understanding of the project and seeking confirmation on their approach.
  • There is a suggestion that the learner should consult their professor for more personalized help, especially given the complexity of their project.
  • The learner describes their setup involving a PIC processor and a connection method, indicating a need for further clarification on interfacing with MATLAB.

Areas of Agreement / Disagreement

Participants generally agree on the importance of consulting documentation and starting with foundational programming concepts. However, there is no consensus on the best approach to tackle the specific robotics project, as participants express varying levels of concern regarding its complexity.

Contextual Notes

Participants note limitations in understanding the learner's specific circuit setup and how it connects to MATLAB, which affects the ability to provide targeted assistance.

DrDanger
Messages
44
Reaction score
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


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.
 


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

- Warren
 


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

- Warren


just started. Learning about matrices right now
 


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.
 


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
 


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


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

- Warren
 


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.
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
8
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
12K
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K