I wamt to generate spheres with different diameters and display it in a single image one below the other
1 次查看(过去 30 天)
显示 更早的评论
clc;
clear all;
close all;
data = csvread("Trial1.CSV");
x = data(:,1);
y = data(:,2);
figure;
plot(x,y);
figure;
[X,Y,Z] = sphere;
surf(X,Y,Z)
axis equal
hold on
for r = y;
for j = 1:4:12
X2 = X*r;
Y2 = Y*r;
Z2 = Z*r;
surf(X2, Y2, Z2)
end
end
I have a signal that was obtained from a sensor. I want to use the signal's changing value to generate spheres and display the spheres one below the other. Please find the signal below and the output that I expect to have.
P.S. I am very new to matlab, so please let me know if I need to provide any more information
1 个评论
Image Analyst
2022-11-22
编辑:Image Analyst
2022-11-22
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
I'm not sure how your signal relates to a sphere, like what does it have to do with a sphere or multiple sphere's radius or center location?
回答(1 个)
Prateek
2022-11-25
Hello Aditya,
For better assistance, could you elaborate on your requirements? Please do include the relationship between the sphere dimensions (X,Y and Z in your code) and the sensor data (x and y in your code).
Regards,
Prateek
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!