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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:29:56+00:00 2026-06-14T23:29:56+00:00

Got one more problem with matrix multiplication in Matlab. I have to plot Taylor

  • 0

Got one more problem with matrix multiplication in Matlab. I have to plot Taylor polynomials for the given function. This question is similar to my previous one (but this time, the function is f: R^2 -> R^3) and I can’t figure out how to make the matrices in order to make it work…

function example
   clf;
   M = 40; 
   N = 20; 

   % domain of f(x)
   x1 = linspace(0,2*pi,M).'*ones(1,N); 
   x2 = ones(M,1)*linspace(0,2*pi,N);

   [y1,y2,y3] = F(x1,x2); 
   mesh(y1,y2,y3,...
     'facecolor','w',...
     'edgecolor','k');
   axis equal; 
   axis vis3d; 
   axis manual; 
   hold on

   % point for our Taylor polynom
   xx1 = 3; 
   xx2 = 0.5; 
   [yy1,yy2,yy3] = F(xx1,xx2); 

   % plots one discrete point
   plot3(yy1,yy2,yy3,'ro'); 

   [y1,y2,y3] = T1(xx1,xx2,x1,x2); 
   mesh(y1,y2,y3,...
     'facecolor','w',...
     'edgecolor','g');


% given function
function [y1,y2,y3] = F(x1,x2)
   % constants
   R=2; r=1; 

   y1 = (R+r*cos(x2)).*cos(x1);
   y2 = (R+r*cos(x2)).*sin(x1);
   y3 = r*sin(x2);

function [y1,y2,y3] = T1(xx1,xx2,x1,x2)
   dy = [
     -(R + r*cos(xx2))*sin(xx1) -r*cos(xx1)*sin(xx2) 
      (R + r*cos(xx2))*cos(xx1) -r*sin(xx1)*sin(xx2) 
                              0  r*cos(xx2)          ];
   y = F(xx1, xx2) + dy.*[x1-xx1; x2-xx2];

function [y1,y2,y3] = T2(xx1,xx2,x1,x2)
% ?

I know that my code is full of mistakes (I just need to fix my T1 function). dy represents Jacobian matrix (total derivation of f(x) – I hope I got it right…). I am not sure how would the Hessian matrix in T2 look, by I hope I will figure it out, I’m just lost in Matlab…

edit: I tried to improve my formatting – here’s my Jacobian matrix

[-(R + r*cos(xx2))*sin(xx1), -r*cos(xx1)*sin(xx2)...
  (R + r*cos(xx2))*cos(xx1), -r*sin(xx1)*sin(xx2)...
  0,                          r*cos(xx2)];
  • 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-14T23:29:57+00:00Added an answer on June 14, 2026 at 11:29 pm
    function [y1,y2,y3]=T1(xx1,xx2,x1,x2)
        R=2; r=1;
        %derivatives
        y1dx1 = -(R + r * cos(xx2)) * sin(xx1);
        y1dx2 = -r * cos(xx1) * sin(xx2);
        y2dx1 = (R + r * cos(xx2)) * cos(xx1);
        y2dx2 = -r * sin(xx1) * sin(xx2);
        y3dx1 = 0;
        y3dx2 = r * cos(xx2);
        %T1
        [f1, f2, f3] = F(xx1, xx2);
        y1 = f1 + y1dx1*(x1-xx1) + y1dx2*(x2-xx2);
        y2 = f2 + y2dx1*(x1-xx1) + y2dx2*(x2-xx2);
        y3 = f3 + y3dx1*(x1-xx1) + y3dx2*(x2-xx2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is an algorithmic question. I have got Dictionary<object,Queue<object>> . Each queue contains one
I've got some problem with my function and don't know how to solve this
I have a problem with events stacking up. I've got a matrix of large
I'm learning MVC 3 and i've got a problem with one thing. I have
Hey all, got one mountain of a problem here. I have completed a program
I have a problem by using the ORMlite framework with more than one table
I have a function that returns one or more variables, but as it changes
I've got two controllers: admin and customers, plus one more called sessions for handling
I got one problem at my exam for subject Principal of Programming Language. I
I've got one function checkEvery15Seconds that runs every 15 seconds. It checks to see

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.