You did not enter enough variable names.Please try again。| matlab pdemodeler导出解报错解决方案

本文记录了在使用MATLAB R2022b版本中的PDEModeler工具包时遇到的一个问题及解决方案。问题表现为在保存并重新打开文件后无法导出解。解决方法是在运行文件后重新点击求解。

今天学习 MATLAB 中的 pdemodeler 工具包时,遇到了下面的问题。

在这里插入图片描述

You did not enter enough variable names.Please try again

我的matlab版本是 R2022b


这个bug应该是这样的:在做好一次 pdemodeler 后,选择保存文件,下次运行该文件后,无法导出解。

解决方案是:运行该文件后,再次点击 = 。重新求解之后就可以导出了


2022年10月4日20点10分

附一个没什么用的实例

% This script is written and read by pdetool and should NOT be edited.
% There are two recommended alternatives:
% 1) Export the required variables from pdetool and create a MATLAB script
%    to perform operations on these.
% 2) Define the problem completely using a MATLAB script. See
%    https://www.mathworks.com/help/pde/examples.html for examples
%    of this approach.
function pdemodel
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',1);
set(ax,'DataAspectRatio',[1 1 1]);
set(ax,'PlotBoxAspectRatio',[1.5 1 1]);
set(ax,'XLim',[-1.5 1.5]);
set(ax,'YLim',[-1 1]);
set(ax,'XTickMode','auto');
set(ax,'YTickMode','auto');

% Geometry description:
pderect([0 1 0 -0.5],'R1');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','R1')

% Boundary conditions:
pdetool('changemode',0)
pdesetbd(4,...
'dir',...
1,...
'1',...
'0')
pdesetbd(3,...
'dir',...
1,...
'0',...
'0')
pdesetbd(2,...
'dir',...
1,...
'1',...
'0')
pdesetbd(1,...
'dir',...
1,...
'0',...
'0')

% Mesh generation:
setappdata(pde_fig,'Hgrad',1.3);
setappdata(pde_fig,'refinemethod','regular');
setappdata(pde_fig,'jiggle',char('on','mean',''));
setappdata(pde_fig,'MesherVersion','preR2013a');
pdetool('initmesh')
pdetool('refine')

% PDE coefficients:
pdeseteq(2,...
'1.0',...
'0',...
'0',...
'1.0',...
'0:0.001:0.3',...
'sin(pi*x)',...
'0.0',...
'[0 100]')
setappdata(pde_fig,'currparam',...
['1.0';...
'0  ';...
'0  ';...
'1.0'])

% Solve parameters:
setappdata(pde_fig,'solveparam',...
char('0','1000','10','pdeadworst',...
'0.5','longest','0','1E-4','','fixed','Inf'))

% Plotflags and user data strings:
setappdata(pde_fig,'plotflags',[1 1 1 1 1 1 1 1 0 0 0 301 1 0 0 0 0 1]);
setappdata(pde_fig,'colstring','');
setappdata(pde_fig,'arrowstring','');
setappdata(pde_fig,'deformstring','');
setappdata(pde_fig,'heightstring','');

% Solve PDE:
pdetool('solve')

当浏览器出现 'Your browser did something unexpected. Please try again. If the error continues, try disabling all browser extensions.' 错误时,可以尝试以下决办法: #### 禁用浏览器扩展 按照提示,禁用所有浏览器扩展。不同浏览器禁用扩展的方式略有不同。以 Chrome 浏览器为例,在地址栏输入 `chrome://extensions/` 并回车,进入扩展管理页面,将所有扩展的开关关闭。 ```python # 以下是一个简单的伪代码示例,用于表示禁用扩展的概念 def disable_extensions(): open_extension_management_page() turn_off_all_extensions() ``` #### 清除浏览器缓存和Cookie 清除浏览器缓存和 Cookie 可以决很多因数据冲突导致的问题。在 Chrome 浏览器中,点击右上角三个点,选择“更多工具” - “清除浏览数据”,在弹出的窗口中选择“所有时间”,勾选“缓存的图像和文件”和“Cookies 及其他网站数据”,然后点击“清除数据”。 ```python # 伪代码示例,用于表示清除缓存和Cookie的概念 def clear_cache_and_cookies(): open_clear_data_page() select_all_time() check_cache_and_cookies() click_clear_data() ``` #### 重置浏览器设置 如果上述方法都无法决问题,可以尝试重置浏览器设置。在 Chrome 浏览器中,点击右上角三个点,选择“设置” - “重置设置” - “将设置还原为默认值”,然后点击“重置设置”。 ```python # 伪代码示例,用于表示重置浏览器设置的概念 def reset_browser_settings(): open_settings() go_to_reset_settings() click_reset_to_default() confirm_reset() ``` #### 更新浏览器 确保使用的是最新版本的浏览器,有时旧版本的浏览器可能存在一些已知的问题,更新到最新版本可以修复这些问题。可以在浏览器的设置中查找更新选项,按照提示进行更新。 ```python # 伪代码示例,用于表示更新浏览器的概念 def update_browser(): open_browser_settings() find_update_option() click_update() wait_for_update_to_complete() ``` #### 检查系统时间和日期 不正确的系统时间和日期可能会导致浏览器出现安全验证问题,从而引发此错误。在 Windows 系统中,右键点击任务栏上的时间,选择“调整日期/时间”,确保日期和时间设置正确。 ```python # 伪代码示例,用于表示检查系统时间和日期的概念 def check_system_time_and_date(): open_date_time_settings() verify_date_and_time() if incorrect: correct_date_and_time() ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值