Question
in matlab
4.1.6 Lamberts W function is defined as the inverse of xe. That is, y-W(x)if and only if x = ye, Write a function y=1ambertW
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Script (Run it as a script, not from command window):

close all
clear
clc

x = linspace(0,4,100);
y = zeros(size(x));
for i = 1:length(x)
y(i) = lambertW(x(i));
end
plot(x,y), xlabel('x'), ylabel('y = W(x)')
title('Lambert Function')

function y = lambertW(x)
func = @(y) x - y*exp(y);
y0 = 0;
y = fzero(func, y0);
end

Plot:

Lambert Function 1.4 1.2 0.8 0.6 0.4 0.2 4 3.5 2.5 3 2 1.5 0.5

Add a comment
Know the answer?
Add Answer to:
in matlab 4.1.6 Lambert's W function is defined as the inverse of xe. That is, y-W(x)if and only if x = ye, Write a function y=1ambertW(x) that computes W using fzero. Make a plot of W(x) for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT