For a high school student to learn the 2nd order equation

This code segment provides the detail on how plot the basic figure and how to use 'solve' instruction to solve a simple example

Al momento, stai seguendo questo contributo

%This code segment aims to demostrate the mapping between the independent
%variable x and its depedent variable y in a simple second order equation
%with one independent variable
% Email: chixinxiao@gmail.com, UoW, AU, 27 Aug 2018
clear all; clc;
x=[-5:5];
y=x.^2+2*x-4
plot(x,y,'bv')
grid on
xlabel('\it x');
ylabel('\it y=x^{2}+2*x-4 ')

%%
%How to solve it?
syms x1
y1=x1^2+2*x1-4;
solve(y1,x1)

% One can plot the root points at the figure obtained by the above code
% segment
hold on
plot(-3.2361,0,'k.')
plot(1.2361,0,'k.')

Cita come

Siyi Xiao (2026). For a high school student to learn the 2nd order equation (https://it.mathworks.com/matlabcentral/fileexchange/68640-for-a-high-school-student-to-learn-the-2nd-order-equation), MATLAB Central File Exchange. Recuperato .

Add the first tag.

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.0.1

Revise some comments

1.0.0