Plotting streamlines on top of a tiff-image
4 views (last 30 days)
Show older comments
Hey there.
I have made a 2D numeric groundwater model, and I would like to plot results on top of an image in MatLab.
So far I have:
[h_x,h_y]=gradient(-Head); % Head is a 137x168-matrix
set(gca,'ydir','reverse');
A= imread('Modelomraade','png'); % Reads the image as a 7376x9000x3-matrix. Bad quality I would like the command below to work
% A= imread('Modelomraade','tiff'); % Reads the image as a 7376x9000x4-matrix, but I'm not able to show this matrix
figure;imshow(A);title('Simulerede strømningslinjer');
hold on
streamslice(h_x,h_y,5); % Draws streamlines with direction arrows.
hold off
This gives me:
As you can see, I have a problem with the dimensions. The streamlines are in the top left corner of the image, but should be covering most of the picture.
I'm left with two problems:
- How do I show the image from the tiff-matrix instead of the png-matrix, which has bad resolution?
- How do I scale the two element, so they're on top of eachother and have the same dimensions?
Please help me!
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!