d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Matlab Help > How To Plot This Ridiculous Function?
123Next
Add Reply New Topic New Poll
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 8 2016 04:08pm


How do I plot this ridiculous function on matlab?
I need to do assignments 2-1 and 2-2.

I want h versus t....
This is what I have so far.. but obviously it doesnt work lol
k1 and k2 are just constants.


Code
k1 = 7.077*10^-4
k2 = 4.9216*10^-4



t = linspace(0,1,10);
(-2/k2)*(h^.5) - ((2*k1)/(k2^2))*log(k1-k2*(h^.5)) = t + (-2/k2)*(5^.5) - ((2*k1)/(k2^2))*log(k1-k2*(5^.5))
figure
plot(t,h)
Member
Posts: 7,855
Joined: Apr 25 2016
Gold: 222.46
Sep 8 2016 06:18pm
google it

This post was edited by FaceDeath on Sep 8 2016 06:43pm
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 8 2016 06:33pm
Quote (FaceDeath @ Sep 8 2016 07:18pm)
why dont you try a couple of questions yourself?
just as an exercise to see if you can do it


I did try it? look at my code :bonk:
Member
Posts: 167
Joined: Oct 2 2014
Gold: 0.00
Sep 8 2016 07:42pm
where do u define h?
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 8 2016 08:09pm
Quote (2wo1ne @ Sep 8 2016 08:42pm)
where do u define h?


nowhere, but I just tried syms h.. so tat didnt work either.

its asking to plot h versus t

so i have to isolate h and set it equal to something but.. its not even possible with this type of equation...
Member
Posts: 18,212
Joined: Jul 15 2014
Gold: 107.77
Sep 8 2016 10:08pm
Those are some strange looking hieroglyphics you got there

Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 9 2016 11:30am
anyone?
Member
Posts: 7,855
Joined: Apr 25 2016
Gold: 222.46
Sep 9 2016 11:32am
Quote (FamilyGuyViewer @ Sep 9 2016 06:30pm)
anyone?


ppl probably getting sick of doing your work for u
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 9 2016 11:59am
Quote (FaceDeath @ Sep 9 2016 12:32pm)
ppl probably getting sick of doing your work for u


why do u keep posting here , if ur not gonna help?
Member
Posts: 35,671
Joined: Aug 11 2008
Gold: 2,130.00
Sep 9 2016 01:31pm
I tried doin meshgrid.. but its not working either

Code
k1 = 7.077*10^-4;
k2 = 4.9216*10^-4;
x = 0:1:5;
y = 0:1:5;
[x,y] = meshgrid(x,y);
z = (-2/k2)*(y.^.5) - ((2*k1)/(k2^2))*log(k1-k2*(y.^.5)) - x + (2/k2)*(5^.5) + ((2*k1)/(k2^2))*log(k1-k2*(5^.5));
mesh(x,y,z)
Go Back To Homework Help Topic List
123Next
Add Reply New Topic New Poll