AppDesigner's issue related to the axis limits - matlab

here i have following code
classdef Average_Pepsi < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
StockPricesAnalysisUIFigure matlab.ui.Figure
DefaultSettingsButton matlab.ui.control.Button
AveragingwindowSlider matlab.ui.control.Slider
AveragingwindowSliderLabel matlab.ui.control.Label
StopKnob matlab.ui.control.Knob
StopKnobLabel matlab.ui.control.Label
StartKnob matlab.ui.control.Knob
StartKnobLabel matlab.ui.control.Label
AverageOptionsButtonGroup matlab.ui.container.ButtonGroup
BothButton matlab.ui.control.RadioButton
MonthlyAverageButton matlab.ui.control.RadioButton
MonthlyButton matlab.ui.control.RadioButton
UIAxes matlab.ui.control.UIAxes
end
properties (Access = private)
ShowAverage
ShowMonthly
AveragingWindow
Averages
StartYear
StopYear
Date % Description
Stock_Price
end
methods (Access = private)
function plot_data(app)
xlim(app.UIAxes,[app.StartYear app.StopYear])
xlim(app.UIAxes,'manual')
if app.ShowMonthly
plot(app.UIAxes,app.Date,app.Stock_Price)
hold(app.UIAxes,'on')
end
if app.ShowAverage
plot(app.UIAxes,app.Date,app.Averages,'r','LineWidth',2)
end
hold(app.UIAxes,'off')
end
function computeAverage(app)
app.Averages = movmean(app.Stock_Price,app.AveragingWindow);
end
function setDefaults(app)
app.AveragingwindowSlider.Value=app.AveragingwindowSlider.Limits(2) /2;
app.BothButton.Value =true;
app.MonthlyButton.Value =false;
app.MonthlyAverageButton.Value =false;
app.StartKnob.Value =app.StartKnob.Limits(1);
app.StopKnob.Value =app.StopKnob.Limits(2);
app.AveragingWindow =app.AveragingwindowSlider.Value;
app.ShowAverage =app.MonthlyAverageButton.Value ||app.BothButton.Value;
app.ShowMonthly =app.MonthlyButton.Value ||app.BothButton.Value;
app.StartYear =app.StartKnob.Value;
app.StopYear =app.StopKnob.Value;
app.computeAverage()
app.plot_data()
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
load PEP.mat PEP
app.Date =PEP.Date;
app.Stock_Price = PEP.Open;
app.setDefaults()
% app.StartYear =app.StartKnob.Value;
%app.StopYear =app.StopKnob.Value;
%app.AveragingWindow =app.AveragingwindowSlider.Value;
%app.ShowAverage =app.MonthlyAverageButton.Value ||app.BothButton.Value;
%app.ShowMonthly =app.MonthlyButton.Value ||app.BothButton.Value;
%app.computeAverage()
%app.plot_data()
end
% Selection changed function: AverageOptionsButtonGroup
function AverageOptionsButtonGroupSelectionChanged(app, event)
app.ShowAverage =app.MonthlyAverageButton.Value ||app.BothButton.Value;
app.ShowMonthly =app.MonthlyButton.Value ||app.BothButton.Value;
app.plot_data()
end
% Value changing function: StartKnob
function StartKnobValueChanging(app, event)
app.StartYear = event.Value;
if app.StartYear > app.StopYear-1
app.StopYear =min([app.StartYear+1,app.StopKnob.Limits(2)]);
app.StopKnob.Value =app.StopYear;
app.StartYear =app.StopYear-1;
app.StartKnob.Value =app.StartYear;
end
app.plot_data()
end
% Value changing function: StopKnob
function StopKnobValueChanging(app, event)
app.StopYear = event.Value;
if app.StopYear < app.StartYear+1
app.StartYear =max([app.StopYear-1,app.StartKnob.Limits(1)]);
app.StartKnob.Value =app.StartYear;
app.StopYear =app.StartYear+1;
app.StopKnob.Value =app.StopYear;
end
app.plot_data()
end
% Value changing function: AveragingwindowSlider
function AveragingwindowSliderValueChanging(app, event)
app.AveragingWindow = event.Value;
app.computeAverage()
app.plot_data()
end
% Button pushed function: DefaultSettingsButton
function DefaultSettingsButtonPushed(app, event)
app.setDefaults()
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create StockPricesAnalysisUIFigure and hide until all components are created
app.StockPricesAnalysisUIFigure = uifigure('Visible', 'off');
app.StockPricesAnalysisUIFigure.Color = [0.4667 0.6745 0.1882];
app.StockPricesAnalysisUIFigure.Position = [100 100 640 480];
app.StockPricesAnalysisUIFigure.Name = 'Stock Prices Analysis';
% Create UIAxes
app.UIAxes = uiaxes(app.StockPricesAnalysisUIFigure);
title(app.UIAxes, 'Pepsi Average')
xlabel(app.UIAxes, {'Year'; ''})
ylabel(app.UIAxes, 'Average Pepsi Stock Prices')
zlabel(app.UIAxes, 'Z')
app.UIAxes.Position = [1 247 565 234];
% Create AverageOptionsButtonGroup
app.AverageOptionsButtonGroup = uibuttongroup(app.StockPricesAnalysisUIFigure);
app.AverageOptionsButtonGroup.SelectionChangedFcn = createCallbackFcn(app, #AverageOptionsButtonGroupSelectionChanged, true);
app.AverageOptionsButtonGroup.Title = 'Average Options';
app.AverageOptionsButtonGroup.Position = [10 142 123 106];
% Create MonthlyButton
app.MonthlyButton = uiradiobutton(app.AverageOptionsButtonGroup);
app.MonthlyButton.Text = 'Monthly';
app.MonthlyButton.Position = [11 60 64 22];
% Create MonthlyAverageButton
app.MonthlyAverageButton = uiradiobutton(app.AverageOptionsButtonGroup);
app.MonthlyAverageButton.Text = 'Monthly Average';
app.MonthlyAverageButton.Position = [11 38 111 22];
% Create BothButton
app.BothButton = uiradiobutton(app.AverageOptionsButtonGroup);
app.BothButton.Text = 'Both';
app.BothButton.Position = [11 16 65 22];
app.BothButton.Value = true;
% Create StartKnobLabel
app.StartKnobLabel = uilabel(app.StockPricesAnalysisUIFigure);
app.StartKnobLabel.HorizontalAlignment = 'center';
app.StartKnobLabel.Position = [195 121 31 22];
app.StartKnobLabel.Text = 'Start';
% Create StartKnob
app.StartKnob = uiknob(app.StockPricesAnalysisUIFigure, 'continuous');
app.StartKnob.Limits = [2000 2022];
app.StartKnob.ValueChangingFcn = createCallbackFcn(app, #StartKnobValueChanging, true);
app.StartKnob.Position = [180 167 60 60];
app.StartKnob.Value = 2000;
% Create StopKnobLabel
app.StopKnobLabel = uilabel(app.StockPricesAnalysisUIFigure);
app.StopKnobLabel.HorizontalAlignment = 'center';
app.StopKnobLabel.Position = [354 221 30 22];
app.StopKnobLabel.Text = 'Stop';
% Create StopKnob
app.StopKnob = uiknob(app.StockPricesAnalysisUIFigure, 'continuous');
app.StopKnob.Limits = [2000 2022];
app.StopKnob.MajorTicks = [2001 2005 2009 2013 2017 2022];
app.StopKnob.ValueChangingFcn = createCallbackFcn(app, #StopKnobValueChanging, true);
app.StopKnob.Position = [338 167 60 60];
app.StopKnob.Value = 2000;
% Create AveragingwindowSliderLabel
app.AveragingwindowSliderLabel = uilabel(app.StockPricesAnalysisUIFigure);
app.AveragingwindowSliderLabel.HorizontalAlignment = 'right';
app.AveragingwindowSliderLabel.Position = [471 199 103 22];
app.AveragingwindowSliderLabel.Text = 'Averaging window';
% Create AveragingwindowSlider
app.AveragingwindowSlider = uislider(app.StockPricesAnalysisUIFigure);
app.AveragingwindowSlider.Limits = [4 12];
app.AveragingwindowSlider.ValueChangingFcn = createCallbackFcn(app, #AveragingwindowSliderValueChanging, true);
app.AveragingwindowSlider.Position = [456 197 150 3];
app.AveragingwindowSlider.Value = 4;
% Create DefaultSettingsButton
app.DefaultSettingsButton = uibutton(app.StockPricesAnalysisUIFigure, 'push');
app.DefaultSettingsButton.ButtonPushedFcn = createCallbackFcn(app, #DefaultSettingsButtonPushed, true);
app.DefaultSettingsButton.Position = [300 44 100 22];
app.DefaultSettingsButton.Text = 'Default Settings';
% Show the figure after all components are created
app.StockPricesAnalysisUIFigure.Visible = 'on';
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = Average_Pepsi
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.StockPricesAnalysisUIFigure)
% Execute the startup function
runStartupFcn(app, #startupFcn)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.StockPricesAnalysisUIFigure)
end
end
end
and there is corresponding result :
for example when i am trying to click any button, for instance MonthlyAverage or change slide buttons, i have got following mistakes :
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AverageOptionsButtonGroupSelectionChanged (line 97)
app.plot_data()
Error using matlab.ui.control.internal.model.AbstractMutualExclusiveComponent/set.Value (line 151)
Error while evaluating ButtonGroup SelectionChangedFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AverageOptionsButtonGroupSelectionChanged (line 97)
app.plot_data()
Error using matlab.ui.control.internal.model.AbstractMutualExclusiveComponent/set.Value (line 151)
Error while evaluating ButtonGroup SelectionChangedFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StartKnobValueChanging (line 110)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StartKnobValueChanging (line 110)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StartKnobValueChanging (line 110)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/StopKnobValueChanging (line 124)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Knob PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/AveragingwindowSliderValueChanging (line 132)
app.plot_data()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Slider PrivateValueChangingFcn.
Error using xlim (line 31)
Limits must be a 2-element vector of increasing datetime values.
Error in Average_Pepsi/plot_data (line 35)
xlim(app.UIAxes,[app.StartYear app.StopYear])
Error in Average_Pepsi/setDefaults (line 67)
app.plot_data()
Error in Average_Pepsi/DefaultSettingsButtonPushed (line 138)
app.setDefaults()
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Button PrivateButtonPushedFcn.
but i have code for checking those mistakes, one is this :
function StartKnobValueChanging(app, event)
app.StartYear = event.Value;
if app.StartYear > app.StopYear-1
app.StopYear =min([app.StartYear+1,app.StopKnob.Limits(2)]);
app.StopKnob.Value =app.StopYear;
app.StartYear =app.StopYear-1;
app.StartKnob.Value =app.StartYear;
end
app.plot_data()
end
and another is this :
function StopKnobValueChanging(app, event)
app.StopYear = event.Value;
if app.StopYear < app.StartYear+1
app.StartYear =max([app.StopYear-1,app.StartKnob.Limits(1)]);
app.StartKnob.Value =app.StartYear;
app.StopYear =app.StartYear+1;
app.StopKnob.Value =app.StopYear;
end
app.plot_data()
end
i can't understand reason of this mistake

You are assignin the two limits one by one.
If you assign them toghether, you should not get an error anymore:
Axes.XLim =[Start End] (leave just the space between the two terms).

Related

Sequential numerical integration in MATLAB

I am trying to write the program in MATLAB to perform sequential integration. First I define the first integral n_array_exact{1}() and save it as function handle in the array. This first integral becomes a function of x only after the integration. As a next step I use this function to calculate next double integral (call it n_array_exact{2}(x)) w.r.t mu1 and s. Before substituting n_array_exact{1}(x) to calculate n_array_exact{2}(x), I replace x in n_array_exact{1}(x) to a function called xp(x, mu1,s) instead.
% Ordinary integration
n_array_exact{1} = #(x) integral(#(mu) exp((x.*mu)), -1,1)/2;
xp2= #(x,mu1,s) sqrt(x*x +s*s +2*x*mu1*s);
for i=2:3
n_array_exact{i} = #(x) integral2(#(mu1,s) exp(-s.*mu1.*x).*n_array_exact{1}(xp2(x,mu1,s)), 0,1,-1,1);
end
n_array_exact{2}(0.05)
%n_array_exact{3}(0.05)
%n_array_exact{4}(0.05)
After performing the integration and trying to evaluate n_array_exact{2}0.05) I got the following errors:
Error using .*
Matrix dimensions must agree.
Error in #(mu)exp((x.*mu))
Error in integralCalc/iterateScalarValued (line 315)
fx = FUN(t);
Error in integralCalc/vadapt (line 133)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 76)
[q,errbnd] = vadapt(#AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in #(x)integral(#(mu)exp((x.*mu)),-1,1)/2
Error in #(mu1,s)exp(-s.*mu1.*x).*n_array_exact{1}(xp2(x,mu1,s))
Error in integral2Calc>integral2t/tensor (line 229)
Z = FUN(X,Y); NFE = NFE + 1;
Error in integral2Calc>integral2t (line 56)
[Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Error in integral2Calc (line 10)
[q,errbnd] = integral2t(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 106)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in #(x)integral2(#(mu1,s)exp(-s.*mu1.*x).*n_array_exact{1}(xp2(x,mu1,s)),0,1,-1,1)
Error in test (line 10)
n_array_exact{2}(0.05)

Array of function handle in matlab

Starting from the vector Psi_0 I define the propagated vector as Psi (t) = exp{-iHt} Psi_0, where H is the Adjacency matrix (but I think it is irrelevant to my problem here). I need to calculate
1/tau * int^tau_0 |<j|psi(t)>|^2 dt
I tried to do this in the following way but it doesn't work
psi_0 = diag(eye(N))/N;
Psi_t = zeros(N);
Psi_sqared = #(t) (expm(1j*A*t)*psi_0).*(expm(-1j*A*t)*psi_0);
c_tqw = integral(Psi_sqared, 0, 10000)/10000;
The error is the following
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the
second matrix. To perform elementwise multiplication, use '.*'.
Error in centrality_measure>#(t)(expm(1j*A*t)*psi_0).*(expm(-1j*A*t)*psi_0)
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(#AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in centrality_measure (line 75)
c_tqw = integral(Psi_sqared, 0, 10000)/10000;
Any suggestion to avoid this error?

Integrating constant variable in MATLAB

I want to iterate an integral of the form
integral(f,-1,1)
where f = #(t) (s-t)*t, with s being some variable, with respect to which I'm not integrating (so that I'm getting a function of s as a result of integration).
So I defined s as syms s, but I'm getting the following response:
Error using integralCalc/finalInputChecks (line 511)
Input function must return 'double' or 'single' values. Found 'sym'.
Error in integralCalc/iterateScalarValued (line 315)
finalInputChecks(x,fx);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(#AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
What can I do in order to integrate, say, s*dt from 0 to 1 and get s instead of errors in MATLAB?

3D Spherical Plot in Matlab with Derivatives and Bessel Functions

I want to plot the following function B(r,theta,phi) in spherical coordinates.
Bo = 1;
a = 1; % m
lambda = 1; % m^-1
syms r theta;
Br = 2*Bo*(a/r)*besselj(1,lambda*r)*cos(theta)
Bth = -Bo*(a/r)*diff(r*besselj(1,lambda*r),r)*sin(theta)
Bph = lambda*a*Bo*besselj(1,lambda*r)*sin(theta)
[Bx,By,Bz]=sph2cart(Bth,Bph,Br);
x=linspace(0,a);
y=linspace(0,a);
z=linspace(0,a);
quiver3(x,y,z,Bx,By,Bz)
When I run the above code, I receive the following warning and error.
Warning: Using only the real component of complex data.
> In getRealData (line 14)
In quiver3parseargs (line 87)
In quiver3HGUsingMATLABClasses (line 41)
In quiver3 (line 41)
In taylor_state (line 19)
Error using quiver3 (line 43)
DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use VPA.
Error in taylor_state (line 19)
quiver3(x,y,z,Bx,By,Bz)

How to plot x+y in MatLab using ezplot

I tried ezplot in MatLab
ezplot('1.395x-1.935y+16.65')
but got the following errors:
Error using inlineeval (line 14)
Error in inline expression ==> 1.395x-1.935y+16.65
Error: Unexpected MATLAB expression.
Error in inline/feval (line 33)
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
Error in ezplotfeval (line 51)
z = feval(f,x(1));
Error in ezplot>ezplot1 (line 468)
[y, f, loopflag] = ezplotfeval(f, x);
Error in ezplot (line 144)
[hp, cax] = ezplot1(cax, f{1}, vars, labels, args{:});
I think you forgot to put a multiplication sign (*). Try this:
ezplot('1.395*x-1.935*y+16.65')