How to interpolate between multiple contour plots?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
piston_pim_offset
el 12 de Dic. de 2023
Editada: Cris LaPierre
el 13 de Dic. de 2023
l have 3 contour plots for 3 values of "f" like one below. Each is plotted with respect to data from "f"; data of the first plot is coming from an Excel file, and the other two comes from different Excel files. Assume the values of f are 1,2,3. I have data for these exact values (1,2,3), but not for the intermediate values. How do l interpolate it to have specific data for the value of f (i.e. f=2.6)?
Thanks in advance!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1566604/image.png)
1 comentario
Respuesta aceptada
Cris LaPierre
el 12 de Dic. de 2023
You could probably use interp3 if you concatenate all your 2D matrices together in the 3rd dimension.
f1 = [1 2 3 ; 4 5 6];
f2 = [10 20 30 ; 40 50 60];
f3 = [100 200 300 ; 400 500 600];
F = cat(3,f1,f2,f3);
x = 1:size(F,2);
y = 1:size(F,1);
f2_6 = interp3(F,x,y',2.6)
6 comentarios
Cris LaPierre
el 13 de Dic. de 2023
Editada: Cris LaPierre
el 13 de Dic. de 2023
Extract the 'sheet' you want and just plot that.
In my example, I would use contour(f2_6)
Más respuestas (0)
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!