You are Here: Home >< Maths

# MATLAB, limit/log question. Watch

1. i'm trying to edit an M-file whereby it looks similar to this:

% LIM3ADAPTB Approximates lim_{x->2} (log(3*x-5))/(x^2).

t=logspace(-10,0,200); % Vector of values from 10^{0} to 10^(10).
x=1-t; % Vector of values from 1-10^{0} to 1-10^(10),
% i.e. we approach 1 from the left.

y=(log(3*x-5))./(x.^2); % Corresponding y values.

semilogx(t,y)
hold on;
semilogx(t,y,'cx')
hold off;
xlabel('t, where x=1-t')
ylabel('(log(3*x-5))/(x^2)')

y(1)

however i keep getting
Warning: Imaginary parts of complex X and/or Y arguments ignored
and where it says it is ignored it haas something to do with the semilog(t,y) and semilogx(t,y,cx)
i think anyways otherwise all i can think of is soemthing to do with the logspace bit

can anybody help me?

and any input on the green writing, like where i'm going wrong, if i'm goign wrong would be extra helpful thank you

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 8, 2010
Today on TSR

### Oxford interview invitations

When can you expect yours?

### Official Cambridge interview invite list

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

## Make your revision easier

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

Can you help? Study help unanswered threads

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.