Hi, I am coding something in the app designer. I have tried it a test script and it worked fine but when coding into the app, there seems to be an error . Please Help !
Ältere Kommentare anzeigen
I have tested the following code in the script editor and it works fine. But as soon as I copy the code into the app designer, it failes not sure why.
Below is the code I used in the test script.
clc;
%introducing properties
Ta = 100;
Tb = 0;
dmax = 20; %max amount of the barrier could be i.e. size of the entire plastic
Height = 40;
width = 10;
k = 0.257;
iceThickness = 0.01;
A = (Height * width);
deltaT = Ta - Tb;
for d=1:dmax
Q(d) = (k * A * deltaT)/d;
end
T = transpose (Q);
j=0;
for i=1:dmax
j=j+1;
X(j,:) = [i];
end
volume = A*iceThickness;
iceMass = 0.917*volume;
iceMelt = 334*iceMass;
plot(X, T,'red','lineWidth',2); hold on;
yline(iceMelt,'blue','lineWidth',2); hold on;
I have attached the app code and it fails but I dont understand why the code keeps falling over. Can some please help explain what the issue is?
Thank you in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!