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

2 vues (au cours des 30 derniers jours)
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

Réponse acceptée

Stephen23
Stephen23 le 12 Juin 2020
R2 = [3; 4; -3.5; 3.5; 3.5; -3.5; -5; -5 5; 5];
% ^ missing semi-colon

Plus de réponses (0)

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by