{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. 基础准备及入门" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. 请指出如下5个变量名中,哪些是合法的?\n", "\n", "\t`abcd-2\txyz\u001f_3\t3chan\ta变量\tABCDefgh`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. 在指令窗中,运行指令a=sqrt(2)。然后请回答以下问题:计算结果a是精准的$\\\\sqrt{2}$吗?该计算结果只是5位有效数字精度的$\\\\sqrt{2}$近似吗?请在指令窗中,显示出具有最多位有效数字的$\\\\sqrt{2}$近似值?再请恢复MATLAB数值结果显示的默认设置。\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```matlab\n", "vpa(sqrt(2),90)\n", "vpa(sqrt(2)-vpa(sqrt(2),50),100)\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. 设 a = -8 , 运行以下三条指令,问运行结果相同吗?为什么?\n", "\n", "```matlab\n", "w1=a^(2/3)\t\t\n", "w2=(a^2)^(1/3)\t\n", "w3=(a^(1/3))^2\t\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. 指令clear, clf, clc各有什么用处?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "5.想要在MATLAB中产生二维数组$S=\\\\left[\\\\begin{array}{lll}{1} & {2} & {3} \\\\\\\\ {4} & {5} & {6} \\\\\\\\ {7} & {8} & {9}\\\\end{array}\\\\right]$,下面哪些指令能实现目的?\n", "\n", "```matlab\n", "S=[1,2,3;4,5,6;7,8;9]\n", "S=[1 2 3;4 5 6;7 8 9]\n", "S=[1,2,3;4,5,6;7,8,9] \t%整个指令在中文状态下输入\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "6. MATLAB桌面上有哪些图标和超链接可引出帮助浏览器?它们又有什么不同?\n" ] } ], "metadata": { "hide_input": false, "kernelspec": { "display_name": "Matlab", "language": "matlab", "name": "matlab" }, "language_info": { "codemirror_mode": "octave", "file_extension": ".m", "help_links": [ { "text": "MetaKernel Magics", "url": "https://metakernel.readthedocs.io/en/latest/source/README.html" } ], "mimetype": "text/x-octave", "name": "matlab", "version": "0.16.7" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": true, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": true, "user_envs_cfg": false } }, "nbformat": 4, "nbformat_minor": 2 }