plotting a graph for an polinomial with exp(x)

clc
clear all
x=-pi:.1:pi;
y=exp(x)+x^2;
plot(x,y)
when I write that (y) equation; matlab says "Inputs must be a scalar and a square matrix."
How can I plot that equ. please help me. thanks for your interest..

Answers (1)

x.^2 instead of x^2
x=-pi:.1:pi;
y=exp(x)+x.^2;
plot(x,y)

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Asked:

on 1 Nov 2013

Commented:

on 1 Nov 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!