I want to replicate this graph of Grashof number at various velocity at different temperature, but I’m having challenge doing this on Matlab, please any assistance

 Akzeptierte Antwort

KSSV
KSSV am 18 Dez. 2022

0 Stimmen

Read about readtable. Using this import data from excel to MATLAB workspace and than use plot.

6 Kommentare

Maduka
Maduka am 18 Dez. 2022
Okay, but please how do I achieve exactly the graph with the data
KSSV
KSSV am 18 Dez. 2022
Enter these values into MATLAB and use plot.
Maduka
Maduka am 19 Dez. 2022
I have Tried this but still not getting the exact graph
KSSV
KSSV am 19 Dez. 2022
Show us your code.
Maduka
Maduka am 19 Dez. 2022
Gr = 5:5:25; % vectors are orthogonal, allowing implicit expansion to 2D t = (0.2:0.2:1).'; H = 1; n = 1; N = 5; Pr = 0.72; S = 0.2;
% pull out common terms B = Pr*(N-n);
% pull out term blocks % note that the terms of TB1 begin with an imbalanced (Pr*(N-n)^k, so it's unclear what that means % i'm going to assume that means (Pr*(N-n))^k, not Pr*(N-n)^k TB1 = t.^2/2 ... + B*(t.^4/24 - t.^2/4) ... + B^2*(t.^6/720 - t.^4/48 + 5*t.^2/48)... % 5*t^2/48 + B^3*(t.^8/40320 - t.^6/1440 + 5*t.^4/576 - 61*t.^2/1440) ... + B^4*(t.^10/36288000 - t.^8/80640 + 5*t.^6/17280 - 61*t.^4/17280 + 1385*t.^2/806400) - 1/2 ... + B*5/24 ... - B^2*61/720 ... + B^3*277/8064 ... - B^4*(0.014);
TB2 = t.^4/24 ... % + not + B.(t.^6/720 - t.^4/48) ... + B^2*(t.^8/40320 - t.^6/1440 + 5*t.^4/576)... + B^3*(t.^10/32688000 - t.^8/80640 + 5*t.^6/17280 - 61*t.^4/17280) ... + B^4*(t.^12/479001600 - t.^10/7257600 + 5*t.^8/967680 - 61*t.^6/518400 + 1385*t.^4/967680) - t.^2/4 ... + B*5*t.^2/48 ... - B^2*61*t.^2/1440 ... + B^3*277*t.^2/16128 ... - B^4*(7*t.^2/1000);
TB3 = 1/24 ... + B*(1/720 - 1/48) ... + B^2*(1/40320 - 1/1440 + 5/576) ... + B^3*(1/36288000 - 1/80640 + 5/17280 - 61/17280) ... + B^4*(1/479001600 - 1/7257600 + 5/967680 - 61/518400 + 1385/967680) - 1/4 ... + B*5/48 ... - B^2*61/1440 ... + B^3*277/16128 ... - B^4*7/100;
U = -Gr.*TB1 - (S + H - n)*Gr.*(TB2 - TB3); % elementwise multiply
% plot everything figure contourf(Gr,t,U) colorbar figure; hp = plot(t,U,'-d'); lstr = cell(numel(Gr),1); for k = 1:numel(Gr) lstr{k} = sprintf('Gr = %d',Gr(k)); end legend(hp,lstr,'location','southwest')
Now I’m trying to generate same curved graph with this code
Maduka
Maduka am 19 Dez. 2022
If it’s possible to plot without the code, using table values… I’ll appreciate

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2014a

Gefragt:

am 18 Dez. 2022

Kommentiert:

am 19 Dez. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by