Matlab question, just checking If i inputted correctly.

  • Thread starter goonking
  • Start date
  • Tags
    Matlab
In summary, to check if your input is correct in Matlab, you can use the "disp" function or the "isequal" function. The correct syntax for inputting values is variable_name = value, and multiple values can be inputted at once by separating them with commas. To input a string, use single quotes. There is no specific limit to the number of values that can be inputted, but make sure not to exceed your computer's memory capacity.
  • #1
goonking
434
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
  • #2
You are probably intending to use element-by-element multiplication, but you have used matrix multiplication. You need to use the .* operator instead.
 
  • #3
.
 

Attachments

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

FAQ: Matlab question, just checking If i inputted correctly.

How do I check if my input in Matlab is correct?

In order to check if your input is correct, you can use the "disp" function to display the value of the variable you inputted. Alternatively, you can use the "isequal" function to compare your input to the expected output.

What is the correct syntax for inputting values in Matlab?

The syntax for inputting values in Matlab is variable_name = value. Make sure to use the correct operators and syntax for the specific data type you are inputting.

Can I input multiple values at once in Matlab?

Yes, you can input multiple values at once in Matlab by separating them with commas. For example, you can input three values for a vector as follows: vector = [1, 2, 3].

How do I input a string in Matlab?

To input a string in Matlab, you can use single quotes around the text. For example, string = 'Hello World'.

Is there a limit to the number of values I can input in Matlab?

There is no specific limit to the number of values you can input in Matlab. However, it is important to make sure that your input does not exceed the memory capacity of your computer.

Similar threads

Replies
14
Views
2K
Replies
32
Views
3K
Replies
16
Views
2K
Replies
6
Views
6K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
3K
Back
Top