Error using vertcat - Dimensions of arrays being concatenated are not consistent

2 ビュー (過去 30 日間)
Alun Owen
Alun Owen 2020 年 6 月 12 日
コメント済み: Alun Owen 2020 年 6 月 12 日
For my geotechnical engineering project, I need to module an underground thermal energy storage (UTES) unit that is surrounded by soil. The UTES will be a rectangle, with a layer of insulation. I am trying to module this by coding in one big rectangle as the soil, with a smaller rectangle in the middle as the UTES and then an even smaller rectangle which acts as the insulation. However, I keep getting the error seen in the title when reaching R2. I am new to MatLab so sorry if this is an easy question to answer. Here is my code:
thermalmodelS = createpde('thermal','steadystate');
R1 = [3; 4; -7.5; 7.5; 7.5; -7.5; -9; -9; 9; 9];
R2 = [3; 4; -3.5; 3.5; 3.5; -3.5; -5; -5 5; 5];
R3 = [3; 4; -3.3; 3.3; 3.3; -3.3; -4.7; -4.7; 4.7; 4.7];
gd = [R1 R2 R3];
sf = 'R1+R2+R3';
ns = char('R1','R2','R3');
ns = ns';
dl = decsg(gd,sf,ns);
geometryFromEdges(thermalmodelS,dl);
pdegplot(thermalmodelS,'EdgeLabels','on','FaceLabels','on');
xlim([-7.5 7.5]);
ylim([-9 9]);
axis equal

採用された回答

Stephen23
Stephen23 2020 年 6 月 12 日
R2 = [3; 4; -3.5; 3.5; 3.5; -3.5; -5; -5 5; 5];
% ^ missing semi-colon

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by