- #1

- 9

- 0

equation : f = 1.47*(x^4)-10^7*(x)+58.92*(10^6)

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter saeede-
- Start date

- #1

- 9

- 0

equation : f = 1.47*(x^4)-10^7*(x)+58.92*(10^6)

- #2

- 17,247

- 7,068

Code:

`x = 0:0.01:10;`

Code:

`f = 1.47*(x.^4)-10^7*(x)+58.92*(10^6)`

- #3

jedishrfu

Mentor

- 12,951

- 6,798

The dot operator is something often missed by newbies to matlab.

- #4

Mark44

Mentor

- 35,138

- 6,887

Your post confused me -- I thought this might be an equation given to someone in the fourth grade. In English we call such equations fourth

equation : f = 1.47*(x^4)-10^7*(x)+58.92*(10^6)

- #5

Mark44

Mentor

- 35,138

- 6,887

I suspect, without much evidence, that the OP merely wants to graph the equation, where x is a real number.If your x is a row/column matrix you will need to add a . before multiplicative operations to make them element-by-element.

- #6

- 17,247

- 7,068

Yes, and the typical way to do that in matlab is to first create a vector x containing the x values, then using a function as described above to get the corresponding y-values. Then using the matlab plot function, which takes the vectors of x and y values as input. This is why you need the dot in the operator in the second step.I suspect, without much evidence, that the OP merely wants to graph the equation, where x is a real number.

- #7

jedishrfu

Mentor

- 12,951

- 6,798

Plot example:

```
x = [0:100]
y = x .* x
plot(x,y)
```

Also there is a nice MATLAB clone called Freemat which supports the core functionality of MATLAB.

http://freemat.sourceforge.net/

- #8

- 9

- 0

yes I'm not an English person . so it's normal having such mistakes.Your post confused me -- I thought this might be an equation given to someone in the fourth grade. In English we call such equations fourthdegree, not Grade 4.

Share: