From: meng yan on
"John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <hk02rr$d2$1(a)fred.mathworks.com>...
> "meng yan" <anoucxy(a)163.com> wrote in message <hk0036$c0k$1(a)fred.mathworks.com>...
>
> > May be should use others means, the datas of T=T(a,b) are got by inner compute of matlab using Finit Element Analysis ,so I think it cann't simplly get a(a=a(T,b)), but there must have a means to do that . I aways try to use matlab's data process to achieve it ,but all have failed. Who have a good idears ?
> > meng yan
>
> It does not matter how this function has been obtained.
>
> If it does not have a simple, single valued behavior,
> then NOTHING can give you an inverse relationship.
> "Good ideas" are not sufficient to overcome a
> mathematical impossibility.
>
> And, if that relationship is a well behaved one then
> I'll be forced to repeat myself - it is then trivial to
> generate what you wish to see. A simple interpolation
> using interp1 will suffice to build your table.
>
> John

Thanks, John,I got you , it is impossible to got absolutely reverse ,I think i should try other ways. Thank you very much!
From: meng yan on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <c6c16305-02f9-4b5a-89a6-d1918f5d322a(a)u41g2000yqe.googlegroups.com>...
> I don't understand this: a(a=a(T,b))
> I don't know what you're trying to get.
> Are you trying to get a profile or contours or something like that?
> For example, let's say that T is a 2D array and for a certain row and
> column, T will have a value. Do you then want to find all rows and
> column where T = 42 (for example, or some other value)? Something
> like this code from the help?
>
> [X,Y,Z] = peaks(30);
> surfc(X,Y,Z)
> colormap hsv
> axis([-3 3 -3 3 -10 5])
> set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
>
> Of maybe you can simply use the find() function, like
> [rows columns] = find(T == 42)
>
> Giving us a better description of what you want will get you better
> answers.

Hi,ImageAnalyst,I'm sorry to failed to description it clearly.
the question is : I have a matrix T , two vectors a and b,size(T)=101*181,
size(a)=1*101,size(b)=181*1,so I can use 2-D lookup table blocks to got the value of T depending on the input a and b, the most important question is I don't know the relation between T with a and b,only their datas .so if I want to got the value of a , the input of 2-D lookup table block are T and b, how to achieve it? is it possible?
eg.
a=[1 2 3];b=[4 5 6];T=[1 3 5;2 4 6;3 4 5]; a and b as the inputs of lookup table ,output is the value of T, when inputs is 1 and 4,we can got T=1
what I want to do is: T and b as the inputs of lookup table ,output is the value of a,there still don't know their relation.
can you got my idears?
I'm sorry my writting english is so bad.
thanks!
From: ImageAnalyst on
meng:
I think this will help you:

clc;
close all;
clear all;
workspace; % Display workspace panel.

% Create a 1000 row by 10 column array of
% random integers in the range 0-49.
T = uint8(50*rand(1000, 10));

% Set a column where we'll look for a certain T value.
b = 8;

% Find where T = 42 in this column (column b=8)
aAtTEquals42 = find(T(:,b)==42)
From: meng yan on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <c77ceb5c-3916-4299-b30a-400adb08302a(a)36g2000yqu.googlegroups.com>...
> meng:
> I think this will help you:
>
> clc;
> close all;
> clear all;
> workspace; % Display workspace panel.
>
> % Create a 1000 row by 10 column array of
> % random integers in the range 0-49.
> T = uint8(50*rand(1000, 10));
>
> % Set a column where we'll look for a certain T value.
> b = 8;
>
> % Find where T = 42 in this column (column b=8)
> aAtTEquals42 = find(T(:,b)==42)

I had tried to use this way,but there is a defualt. I cann't break in points,so this only got some approximate values,you know that 2D lookup table can break in some others values using algorithms ,the real matrix T is more vectors than only T.
when I use the function find(),it only find the values which excist in only T
thanks very much!
From: ImageAnalyst on
I'm not really sure what you said. It's not understandable to me.
Perhaps are you saying that you need to interpolate and find
fractional indexes because you're giving values that don't exist in
T? If so, I don't think this is what you were saying in the
beginning. But if so, perhaps you need to look into interp2().