How to scale a 3D meshed model plot to a certain size?

17 Ansichten (letzte 30 Tage)
Patrick
Patrick am 21 Sep. 2014
Kommentiert: Patrick am 24 Sep. 2014
I want to have my 3D meshed model plot scaled to a certain size. Are there any functions that can do? I am actually a rookie in Matlab. Please kindly do me a favor.Thanks a lot.

Akzeptierte Antwort

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh am 21 Sep. 2014
Hi Patrick,
What do you meany you want to make it bigger or smaller in proportion?!
You want to stretch it in X and not in Y for instance?
If so then mulyiply X data to a constant grater than 1.
Let me know exactly what we're talking about.
Tnx
  3 Kommentare
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh am 22 Sep. 2014
Patrick, cant you multiplu the whole x,y,z dimensions of the model by a constant?!
data = data.*10;
For example above will make it 10 times bigger
Patrick
Patrick am 24 Sep. 2014
Thank you! I've done it. Sorry that I am really a beginner in Matlab and asking such a simple question. Do appreciate your help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Mike Garrity
Mike Garrity am 24 Sep. 2014
Another technique you should know about (although it might be overkill for this purpose) is hgtransform. This creates an object which you parent your mesh to. This object has a Matrix property you can use to scale, rotate, and translate your mesh:
g = hgtransform
surf(peaks,'Parent',g)
set(g,'Matrix',makehgtform('scale',10))
If you do help on makehgtform, you'll find all of the different transformations you can do with this.
This approach can be very helpful when you have more than one mesh and you're trying to place them relative to each other.

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by