Matlab question, just checking If i inputted correctly.

  • Thread starter Thread starter goonking
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary

Homework Help Overview

The original poster is working with MATLAB and is attempting to verify the correctness of their input related to contour plotting. They express confusion over the output, noting that instead of contours, they only see parallel lines.

Discussion Character

  • Exploratory, Assumption checking

Approaches and Questions Raised

  • Participants discuss the potential misuse of matrix multiplication versus element-by-element multiplication in MATLAB, suggesting that this may be the source of the issue. There is also a request for clarification on whether the original poster has resolved their problem.

Discussion Status

Some guidance has been offered regarding the use of the correct multiplication operator in MATLAB. However, there remains uncertainty about the original poster's current status in solving the problem, as they have not confirmed whether they still require assistance.

Contextual Notes

The original poster's description lacks specific details about the input values or the intended outcome, which may be relevant for further discussion.

goonking
Messages
434
Reaction score
3

Homework Statement


upload_2015-7-12_15-20-35.png


Homework Equations

The Attempt at a Solution


07IYl0C.png

look at line4, did I enter it correctly?
I must have did something wrong because there is no contour at all, all i see are parallel lines.
 
Physics news on Phys.org
You are probably intending to use element-by-element multiplication, but you have used matrix multiplication. You need to use the .* operator instead.
 
.
 

Attachments

  • upload_2015-7-12_15-35-58.png
    upload_2015-7-12_15-35-58.png
    6.3 KB · Views: 399
  • upload_2015-7-12_15-36-56.png
    upload_2015-7-12_15-36-56.png
    2 KB · Views: 440
Last edited:
You need to explain whether you solved the problem or not. It's now unclear whether you need help or not.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K