MATLAB How to Resolve a Plotting Error in Matlab?

AI Thread Summary
The discussion centers around a user seeking assistance with a MATLAB function designed to generate y values from given x data points using a specific equation. The user defines a function called "marko" and attempts to call it with a set of x values, but encounters an error on line 4 of the function. A key point raised is the ambiguity regarding the variable L, which is not defined in the user's code. Additionally, there is a suggestion to post similar queries in more appropriate forums, such as homework help or general computer science sections, for better assistance.
solas99
Messages
69
Reaction score
1
HI,

i have a set of data that i want to plot with matlab, using an equation.
i have all x data points and want to generate y values for each x data point.

function y =marko(x)


y= (4.11/1.98)*{(1/4*((1-x/L).^2))-(1/4)-(x/L)};

x=(218+data points)

from the command window i have called:

y=marko(x);

i keep getting an error in marco (line4)

can someone help me figure out what i am doing wrong here.
 
Physics news on Phys.org
Can you post your complete code?

I'm unsure what your L is.

You might also have better luck posting this sort of thing in the homework help, or in the general computer science locations in the future.
 
Last edited:

Similar threads

Replies
8
Views
2K
Replies
5
Views
2K
Replies
4
Views
2K
Replies
1
Views
5K
Replies
1
Views
3K
Replies
2
Views
3K
Back
Top