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

2 次查看(过去 30 天)
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 个)

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by