Home >Common Problem >How to find the derivative in matlab

How to find the derivative in matlab

藏色散人
藏色散人Original
2020-02-15 11:12:49115286browse

How to calculate derivatives in matlab: 1. Open the matlab software; 2. Enter the command "sysm x" to define a symbolic variable, and enter the command "f1=atan(x)" to define a function; 3. Enter " Use the "df1=diff(f1,x)" command to find the derivative; 4. Enter the "subplot" command to output.

How to find the derivative in matlab

The operating environment of this tutorial: windows7 system, matlab R2012b, Dell G3 computer.

How to find the derivative in matlab?

The operation method is as follows:

1. Open the matlab software;

How to find the derivative in matlab

2. Enter the command clear;clc; to clear the job Space;

How to find the derivative in matlab

3. Enter the command sysm x to define a symbolic variable, as shown in the figure;

How to find the derivative in matlab

4. Enter the instruction f1=atan(x) to define a function;

How to find the derivative in matlab

5. Enter the instruction df1=diff(f1,x) to solve the symbolic solution of the derivative function;

How to find the derivative in matlab

6. Enter the following command to view the derivation results, as shown in the figure;

subplot(1,2,1);ezplot(f1),grid on;subplot(1,2,2);ezplot(df1),grid on;

How to find the derivative in matlab

7. View the derivation results as follows.

How to find the derivative in matlab

The above is the detailed content of How to find the derivative in matlab. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn