to find z values for same x values
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello, I have a data like this (it's actually a bigger data, an example is shown here):
x: 0
y: 2
z: 0.3
x: 0
y: 1
z: 0.4
x: 1
y: 1
z: 0.7
I want to find z values for same x values. I mean what are the values for z when x=0 or when x=1. Thank you in advance.
3 Comments
Rik
on 15 Sep 2020
Do you mean you want to select those values from your existing data? If so, how is your data stored? Fields of a struct array? Vectors? An array?
Sila Dinc
on 15 Sep 2020
Rik
on 15 Sep 2020
First you need to read everything back to Matlab variables so you have a result like this:
x=[0 0 1];
y=[2 1 1];
z=[0.3 0.4 0.7];
Then you can use normal comparison tools like == and find.
Answers (1)
Read about griddata and scatteredIntepolant.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!