Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 965699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:02:25+00:00 2026-05-16T02:02:25+00:00

I am able to create a 3D cone in MATLAB, but: does anyone know

  • 0

I am able to create a 3D cone in MATLAB, but: does anyone know how to paint the cone so that it recreates the HSV color space? I know there is the command:

colormap hsv;

but how do I use it?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:02:26+00:00Added an answer on May 16, 2026 at 2:02 am

    I’m guessing you want to create a plot similar to the cone in the following Wikipedia image:

    One way to do this is to plot your cone and texture map the surface with an image of the HSV color space. Here’s how you could do this:

    % First, create a 100-by-100 image to texture the cone with:
    
    H = repmat(linspace(0, 1, 100), 100, 1);     % 100-by-100 hues
    S = repmat([linspace(0, 1, 50) ...           % 100-by-100 saturations
                linspace(1, 0, 50)].', 1, 100);  %'
    V = repmat([ones(1, 50) ...                  % 100-by-100 values
                linspace(1, 0, 50)].', 1, 100);  %'
    hsvImage = cat(3, H, S, V);                  % Create an HSV image
    C = hsv2rgb(hsvImage);                       % Convert it to an RGB image
    
    % Next, create the conical surface coordinates:
    
    theta = linspace(0, 2*pi, 100);  % Angular points
    X = [zeros(1, 100); ...          % X coordinates
         cos(theta); ...
         zeros(1, 100)];
    Y = [zeros(1, 100); ...          % Y coordinates
         sin(theta); ...
         zeros(1, 100)];
    Z = [2.*ones(2, 100); ...        % Z coordinates
         zeros(1, 100)];
    
    % Finally, plot the texture-mapped surface:
    
    surf(X, Y, Z, C, 'FaceColor', 'texturemap', 'EdgeColor', 'none');
    axis equal
    

    And you should get the following figure:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am able to create JFormatted TextField that accepts only float values,but I am
Has anyone been able to create Container-Specific Master Pages for Safari or Chrome? I
I am able to create and execute a DTS package that copies tables from
I have been able to create ASPX pages without the code behind, but I
In Delphi, I want to be able to create an private object that's associated
I want to be able to create users that have a straight up SHA-1
I want to be able to create a class (in Python) that once initialized
You should be able to create a generic form: public partial class MyGenericForm<T> :
I need to be able to create basic MS Project items (tasks, projects, resources,
I want to be able to create a GUID/UUID on the iPhone and iPad.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.