-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ27_TemperaturePlot.m
More file actions
52 lines (45 loc) · 2.12 KB
/
Q27_TemperaturePlot.m
File metadata and controls
52 lines (45 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% =========================================================================================
% FILE NAME: Q27_TemperaturePlot.m
% AUTHOR: [Amey Thakur](https://github.com/Amey-Thakur)
% COURSE REPO: https://github.com/Amey-Thakur/COMPUTATIONAL-METHODS-AND-MODELING-FOR-ENGINEERING-APPLICATIONS
% RELEASE DATE: September 08, 2023
% LICENSE: Creative Commons Attribution 4.0 International (CC BY 4.0)
%
% DESCRIPTION:
% This script visualizes temperature variation over time by plotting the function
% T = 7*ln(t) - 8*e^(0.3t) within the temporal interval [1, 3].
%
% PROBLEM STATEMENT (Q27):
% Plot the following function for t over the interval 1 <= t <= 3:
% T = 7*ln(t) - 8*e^(0.3t)
%
% Reference: MATLAB for Engineering Applications, William J. Palm, Chapter 1, Q27.
%
% TECHNOLOGY STACK:
% - Programming Language: MATLAB (R2023a+)
% =========================================================================================
% --- Environment Initialization ---
clc; % Clear Command Window for optimal visualization
clear; % Purge workspace variables to maintain computational integrity
close all; % Close existing figure windows for a fresh plotting environment
% --- Data Acquisition & Grid Generation ---
% Define the time interval [1, 3] with high-resolution sampling for smooth plotting
t = linspace(1, 3, 500); % 500 points for a precise continuous curve
% --- Functional Computation ---
% T(t) = 7 * ln(t) - 8 * e^(0.3 * t)
temperature = 7 * log(t) - 8 * exp(0.3 * t);
% --- Visualization Engine ---
figure('Color', 'w', 'Name', 'Temperature Variation Analysis');
plot(t, temperature, 'LineWidth', 2, 'Color', '#0072BD');
% Grid and Aesthetic Configuration
grid on;
set(gca, 'FontName', 'Arial', 'FontSize', 10);
ax = gca;
ax.GridLineStyle = ':';
ax.GridAlpha = 0.4;
% Annotation and Labeling
title('Temperature vs. Time Analysis', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (t) [minutes]', 'FontSize', 12);
ylabel('Temperature (T) [°Celsius]', 'FontSize', 12);
% Professional Scholarly Footer
fprintf('Scholarly Insight: The temperature profile exhibits a non-linear decay characteristic of combined logarithmic and exponential dynamics.\n');