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 9231859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:10:28+00:00 2026-06-18T06:10:28+00:00

I have tried to plot this function: t=linspace(0,2*pi,100); a=input(‘a= ‘); b=input(‘b= ‘); c=input(‘c= ‘);

  • 0

I have tried to plot this function:

t=linspace(0,2*pi,100);
a=input('a= ');
b=input('b= ');
c=input('c= ');
k = a*(1-(sin(3*t)).^(2*b))+c;
polar(t,k)

% a=2.6
% b=0.4
% c=5

Each time, I get the following message:

Warning: Imaginary parts of complex X and/or Y arguments ignored.

I have tried the pol2cart method as such:

t=linspace(0,2*pi,100);
a=input('a= ');
b=input('b= ');
c=input('c= ');
k = a*(1-(sin(3*t)).^(2*b))+c;
[x,y] = pol2cart(t,k);
plot(x,y)

I got the same message again.
I have tried to convert it to spherical coordinates, it didn’t work. I have also tried the arrayfun method as suggested in a forum answer, it didn’t work as well.
Can someone please help me?
Thank you!

  • 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-06-18T06:10:29+00:00Added an answer on June 18, 2026 at 6:10 am

    Your problem is in your function. k contains imaginary numbers, because of this:

    sin(3*t).^(0.8)
    

    If you want to make sure it doesn’t contain imaginary numbers, you need to increase b. Bottom line is, fix your formula. I can only suppose you mean something like this, but there could be other solutions. Essentially, I think you mean to take the exponent of 1-sin, not sin.

    k=a*((1-sin(3*t)).^(2*b))+c;
    

    This gives the following plot (From Octave, but it should be the same)

    enter image description here

    I figured this out by `plot(k). If k contains imaginary, it will plot the real vs imaginary components. If it is purely real, it will plot the line vs time.

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

Sidebar

Related Questions

I have following data and plot: pos <- rep(1:2000, 20) xv =c(rep(1:20, each =
Have tried to find solutions for this and can't really come up with anything.
I have tried searching over the internet about this problem but not able to
I have tried this: #define format(f, ...) \ int size = strlen(f) + (sizeof((int[]){__VA_ARGS__})/sizeof(int))
I asked this question yesterday about storing a plot within an object. I tried
So I'd like to plot simple gamma function, but I have some problems. My
I have the following declaration in a Module: Private Declare Function gzopen Lib ZLIB.DLL
So I have the following function which works well when called from the REPL:
I have a jqPlot line plot which is drawing beautifully, but I cannot get
I have tried to go through the jungle (really, PayPal, why don't you weed

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.