defined n with the equation

4 views (last 30 days)
Abdulrahman Al Baalharith
Abdulrahman Al Baalharith on 17 Nov 2019
Answered: Walter Roberson on 17 Nov 2019
  • Create new arrays ‘delt’ and ‘delT’ as the mid-step values computed
from ‘t’ as delt = (t(n)-t(n-1)) and delT = (T(n)-T(n-1)). As a check, delt
will have positive values and delT will be negative values. With
negative delT values, the negative sign in the qm term will be flipped to
a positive one, resulting in positive values for h. ‘n’ is a subscript that
you could use to keep track entries of the time and temperature
arrays.
This what he wrote to us. I think that n = how many row that I have, but how I will write the equation t(n)-t(n-1) because I think he meant that t in row 5 mins t in row 5-1 but I could not figure this out. please help me.
  2 Comments
KALYAN ACHARJYA
KALYAN ACHARJYA on 17 Nov 2019
Can you share what you have tried so far?
Abdulrahman Al Baalharith
Abdulrahman Al Baalharith on 17 Nov 2019
>> p = 8470; % defined the Density
>> d = 0.015; % defined the Diameter
>> l = 0.045; % defined the Length
>> cp = 4184; % defined the Specific heat capacity
>> Ts= 21; % defined the Temperature of the Canola oil in the quench tank
>> r = d/2; % defined the radius
>> V = (pi*(r^2)*l)); % Assume that the shape of the probe is Cylindrical and find the volume for it
V = (pi*(r^2)*l)); % Assume that the shape of the probe is Cylindrical and find the volume for it
Error: Invalid expression. When calling a function or indexing a
variable, use parentheses. Otherwise, check for mismatched
delimiters.
>> V = (pi*(r^2)*l); % Assume that the shape of the probe is Cylindrical and find the volume for it
>> A = (2*pi*r*l+2*pi*(r^2)); % Find the area for the Cylindrical shape for the probe.
>> P4 = xlsread ('RDData'); % Reading the file
>> t = P4(:, 1); % Assign the first column to ‘t’,
>> T = P4(:, 2); % Assign the first column to ‘T’
>> n = (1:343); % ‘n’ is a subscript that you could use to keep track entries, and there is 343
>> delt = (t(n)-t(n-1)); % new arrays ‘delt’ as the mid-step values computed from ‘t’ as delt
Array indices must be positive integers or logical values.
>> n= size(1,P4)
Error using size
Dimension argument must be a positive integer scalar or a vector of
positive integers.
>> n= size(P4)
n =
563 5
>> delt = (t(n)-t(n-1));

Sign in to comment.

Answers (2)

Fabio Freschi
Fabio Freschi on 17 Nov 2019
n= size(P4,1)

Walter Roberson
Walter Roberson on 17 Nov 2019
"Create as the midstep values are computed" is talking about a for loop with controlling variable n, and for n=2 onwards you calculate those expressions.
As they talk about creating those as arrays there is probably an implied
delt(n-1) = t(n) - t(n-1)

Tags

Community Treasure Hunt

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

Start Hunting!