How can i put my four different arrays dataset in the in form of [X,Y,Z,V] = flow (10)
조회 수: 2 (최근 30일)
이전 댓글 표시
dataset:
strain = [0.05:0.05:0.5];
stress = [560 580 601 630 750 790 821 863 913 979];
temp = [25:50:450];
rate = [4000:500:8500];
I want to carryout interp3 & slice on the datasets above.
The example i saw used expression this [X,Y,Z,V] = flow(10) to load the data first.
Really need guide on how to conduct the interp3 & slide.
Thank you
댓글 수: 4
Guillaume
2019년 1월 14일
The example i saw used expression this [X,Y,Z,V] = flow(10) to load the data first.
We have no idea what examples you're talking about. The code you show simply calls a function called flow with a single input of 10 and puts whatever it outputs in 4 different variables. We don't know what flow is nor what it does. If it loads some data then I would guess that the loading is hardcoded in the function and is completely independent of that 10 input.
"I want to carryout interp3 & slice on the datasets above."
documentation of interp3 and slice (with examples). You haven't explained what you want to do other than tell us you want to use 2 functions. What is to be interpolated? Between what and what and at what interval? What slices have to be drawn, etc?
"please assist , it's urgent"
Then make sure you provide as much information as possible and be as clear as possible.
답변 (1개)
Steven Lord
2019년 1월 16일
The flow function is a helper function used by a number of demo files. It doesn't do anything really special. It just calls meshgrid to generate 3-D coordinate arrays, evaluates a specific function using those coordinates, and returns the coordinates. You can see the code using edit or type to open it up.
Your four variables strain, rate, temp, and stress are each vectors (rate, strain, and stress have ten elements while temp has nine.) So you don't seem to have the type of volumetric data that you'd need to create a slice plot. If all the vectors had ten elements you could scatter3 them, using three of the vectors as the X, Y, and Z coordinates and the fourth as color or size, but because of the size difference you can't do that. But let's scatter3 rate, strain, and stress to see what they look like:
scatter3(rate, strain, stress)
The type of volume visualization you want to perform would need to know what your function looks like when rate is near 9000, strain is near 0, and stresss is near 500. You don't have a point in the scatter3 plot anywhere near there, so in imitation of old mapmakers: here be dragons.
So what do you need to do to create those types of plots? Gather more data. Or if those were just for illustration purpose and you actually do have data that is either gridded or suitable for gridding, your coordinate variables should be in meshgrid form (if they're scattered use scatteredInterpolant or griddata to generate data on a uniform grid first) then pass the gridded coordinates plus the 3-D array with the values of your "function" (which may not be a function, but may be the result of measurements) into slice.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Stress and Strain에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
