Category: Matlab
Category Archives: Matlab
Create 30 minute bins by reading time stamps
I have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
ThanksI have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
Thanks I have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
Thanks time MATLAB Answers — New Questions
Create 30 minute bins by reading time stamps
I have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
ThanksI have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
Thanks I have a file with time stamps, due to error in the files (gaps in time due to faulty equipment) binning 30 minute sections using the following code creates errors in the actograms produced.
function[Average] = Av_30min(y)
Average = zeros(288,size(y,2));
k = 1;
for l =1:288
Average(l,1) = mean(y(k:k+(round(length(y)/288)-1),1));
k = k+((round(length(y)/288)-1));
end
end
I want to read from say 11:30:00 – 12:00:00 and average this bin and so on and so forth. Can anyone help?
Thanks time MATLAB Answers — New Questions
open .m file GUI in GUIDE
Hello,
I am new to Matlab GUI and I have a .m file that contains all the info for an already existing GUI. I would like to open this .m file in Guide so I can adjust the positions and add new components. Is there a way to do this? Is there another way maybe where I can visually adjust?Hello,
I am new to Matlab GUI and I have a .m file that contains all the info for an already existing GUI. I would like to open this .m file in Guide so I can adjust the positions and add new components. Is there a way to do this? Is there another way maybe where I can visually adjust? Hello,
I am new to Matlab GUI and I have a .m file that contains all the info for an already existing GUI. I would like to open this .m file in Guide so I can adjust the positions and add new components. Is there a way to do this? Is there another way maybe where I can visually adjust? guide, matlab gui MATLAB Answers — New Questions
how to get one shape out of multiple shapes
Hi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanksHi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanks Hi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanks merge, plot, shape, matlab MATLAB Answers — New Questions
how to get one shape out of multiple shapes
Hi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanksHi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanks Hi,
I have multiple shapes I need to merge into a single shape, because I have sets of shapes those I have to merge and compare with each other (put into a one plot).
the set of data is attached and I can plot it like this:
plot(X(:, [1:end 1])’, Y(:, [1:end 1])’)
let me know, if you know how to do it, thanks.
I got this shape using patch, but it generated a Patch file that I cannot use.
Ideally, I would like my data was interpolated so the final shape will not have sharp edges but be smooth and go down to Y=0.
Help me handle that too if you can. thanks merge, plot, shape, matlab MATLAB Answers — New Questions
How to replace a categorical label by another label if the label satisfies a condition?
I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell.I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell. I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell. access cell, handling data, categorical data MATLAB Answers — New Questions
How to replace a categorical label by another label if the label satisfies a condition?
I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell.I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell. I have a 1872×1 cell data where each cell comprises 1×5000 categorical labels of 4 kinds (P, QRS, T, or n/a) (please, see the figures below).
I want to replace consecutive labels whose sequence number is less than m that is any positive integer (e.g. 2, 3, 4, …)
It is desired because a too-short sequence of a label is a wrong prediction.
For instance, if there is a sequence like: (… P P P T P P P…) where only one "T", then, T is replaced by the label "P" and we have (… P P P P P P P…).
So, the target label or labels are replaced by the one that precedes and follows the target label.
Another example can be (… T T T P P P T T T…) needs to become (… T T T T T T T T T …).
This process is required for the whole 5000 categorical labels over all cell elements.
The mat files look like the below as the screenshots and the mat file of the first 5 rows was attached for your reference that can be downloaded.
First five rows of the 1872×1 cell-mat file.
The first element of the cell. access cell, handling data, categorical data MATLAB Answers — New Questions
Convert datetime to datestr without losing milisecond data
I am calling in time and date data from an excel spreadsheet using the readcell function, with the resultant column consisting of datetime arrays (column 4). I tried to set the variable type as ‘string’ to solve the below problem, but it is still calling in collumn 4 as datetime.
opts = detectImportOptions(fname);
opts.Sheet = 2;
opts = setvartype(opts, ‘string’);
Data = readcell(fname,opts);
The problem I am having is that the original data called in has milliseconds included:
>> Data{1,4}
ans =
datetime
22-Jul-2023 15:18:15.171
But when I convert the datetime data into a string:
datestr(ans)
the result is
’22-Jul-2023 15:18:15′
losing the millisecond information.
Basically, I want to search the next line to see if the next datetime occurs within 2 seconds of the original (ie. if Data{2,4} is within 2.00 seconds of Data{1,4}) without losing the milisecond info.
So either is there a different way of converting the datetime to a string or char or anything that will not lose the millisecond information?
Or is there another way of calling in the spreadsheet data in the first place?
The data I want to call in from the spreadsheet is:
collumn 1: file names (includes numbers and letters)
collumn 2: participant name (letters)
collumn 4: datetime
collumn 7: data (numbers)
Thanks in advance!I am calling in time and date data from an excel spreadsheet using the readcell function, with the resultant column consisting of datetime arrays (column 4). I tried to set the variable type as ‘string’ to solve the below problem, but it is still calling in collumn 4 as datetime.
opts = detectImportOptions(fname);
opts.Sheet = 2;
opts = setvartype(opts, ‘string’);
Data = readcell(fname,opts);
The problem I am having is that the original data called in has milliseconds included:
>> Data{1,4}
ans =
datetime
22-Jul-2023 15:18:15.171
But when I convert the datetime data into a string:
datestr(ans)
the result is
’22-Jul-2023 15:18:15′
losing the millisecond information.
Basically, I want to search the next line to see if the next datetime occurs within 2 seconds of the original (ie. if Data{2,4} is within 2.00 seconds of Data{1,4}) without losing the milisecond info.
So either is there a different way of converting the datetime to a string or char or anything that will not lose the millisecond information?
Or is there another way of calling in the spreadsheet data in the first place?
The data I want to call in from the spreadsheet is:
collumn 1: file names (includes numbers and letters)
collumn 2: participant name (letters)
collumn 4: datetime
collumn 7: data (numbers)
Thanks in advance! I am calling in time and date data from an excel spreadsheet using the readcell function, with the resultant column consisting of datetime arrays (column 4). I tried to set the variable type as ‘string’ to solve the below problem, but it is still calling in collumn 4 as datetime.
opts = detectImportOptions(fname);
opts.Sheet = 2;
opts = setvartype(opts, ‘string’);
Data = readcell(fname,opts);
The problem I am having is that the original data called in has milliseconds included:
>> Data{1,4}
ans =
datetime
22-Jul-2023 15:18:15.171
But when I convert the datetime data into a string:
datestr(ans)
the result is
’22-Jul-2023 15:18:15′
losing the millisecond information.
Basically, I want to search the next line to see if the next datetime occurs within 2 seconds of the original (ie. if Data{2,4} is within 2.00 seconds of Data{1,4}) without losing the milisecond info.
So either is there a different way of converting the datetime to a string or char or anything that will not lose the millisecond information?
Or is there another way of calling in the spreadsheet data in the first place?
The data I want to call in from the spreadsheet is:
collumn 1: file names (includes numbers and letters)
collumn 2: participant name (letters)
collumn 4: datetime
collumn 7: data (numbers)
Thanks in advance! datetime, strings, milliseconds, readcell MATLAB Answers — New Questions
VB .NET function use in matlab
Hi all,
I am trying to use a VB .NET dll in matlab. The dll is available from the federal aviation administration website: https://www.airporttech.tc.faa.gov/Products/Airport-Safety-Papers-Publications/Airport-Safety-Detail/ArtMID/3682/ArticleID/2838/ICAO-ACR-13
The dll user guide is attached to this post.
What I tried:
library = NET.addAssembly(‘[Mypath] ACRClassLib DLL 2020.12.14 .NET 4.7.2ACRClassLib.dll’);
seems to work. Then:
CalculateACR(1,40000,0.47,4,200,[-15 15 -15 15],[0.0 0.0 55.0 55.0],true)
I get: "Check for incorrect argument data type or missing argument in call to function ‘CalculateACR’".
I think the problem is coming from the first argument which is required to be an enumeration member. The enumeration PavementType seems to be included in the library but I don’t know how to call it…
Thank you for your answers!Hi all,
I am trying to use a VB .NET dll in matlab. The dll is available from the federal aviation administration website: https://www.airporttech.tc.faa.gov/Products/Airport-Safety-Papers-Publications/Airport-Safety-Detail/ArtMID/3682/ArticleID/2838/ICAO-ACR-13
The dll user guide is attached to this post.
What I tried:
library = NET.addAssembly(‘[Mypath] ACRClassLib DLL 2020.12.14 .NET 4.7.2ACRClassLib.dll’);
seems to work. Then:
CalculateACR(1,40000,0.47,4,200,[-15 15 -15 15],[0.0 0.0 55.0 55.0],true)
I get: "Check for incorrect argument data type or missing argument in call to function ‘CalculateACR’".
I think the problem is coming from the first argument which is required to be an enumeration member. The enumeration PavementType seems to be included in the library but I don’t know how to call it…
Thank you for your answers! Hi all,
I am trying to use a VB .NET dll in matlab. The dll is available from the federal aviation administration website: https://www.airporttech.tc.faa.gov/Products/Airport-Safety-Papers-Publications/Airport-Safety-Detail/ArtMID/3682/ArticleID/2838/ICAO-ACR-13
The dll user guide is attached to this post.
What I tried:
library = NET.addAssembly(‘[Mypath] ACRClassLib DLL 2020.12.14 .NET 4.7.2ACRClassLib.dll’);
seems to work. Then:
CalculateACR(1,40000,0.47,4,200,[-15 15 -15 15],[0.0 0.0 55.0 55.0],true)
I get: "Check for incorrect argument data type or missing argument in call to function ‘CalculateACR’".
I think the problem is coming from the first argument which is required to be an enumeration member. The enumeration PavementType seems to be included in the library but I don’t know how to call it…
Thank you for your answers! .net, enumeration MATLAB Answers — New Questions
Can I get an example model to get the diagnostic action for the option ‘Detect underflow’?
I would like to see a parameter to diagnose underflow for single data type when running Simulink model.I would like to see a parameter to diagnose underflow for single data type when running Simulink model. I would like to see a parameter to diagnose underflow for single data type when running Simulink model. MATLAB Answers — New Questions
Problem with displaying output of executable
I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem?I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem? I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem? executable, display, output, command line MATLAB Answers — New Questions
Problem with displaying output of executable
I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem?I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem? I have a function which produces a string output:
out = myfunction(arg1, arg2)
The last line of the function is disp(out).
I used the deploytool to produce an executable (for Windows). However, when I call myfunction arg1 arg2 in cmd, I do not see any output.
I know the function is working correctly because if I replace disp by writing to a file, that works.
Also what is strange is that if I replace disp() by error(), I do see the error message.
Has anybody had this problem? executable, display, output, command line MATLAB Answers — New Questions
Is there anyway to increase the calculation speed of this sqrt integral2 without loosing accuracy?
Any suggestion to increase the calculation speed of this integral2?
g = @(xx,yy)sqrt((xx.*1.103872343207215e+1-yy.*3.605544873768034e-1+xx.^2.*yy.^2.*2.981255793882863e+2-xx.^2.*yy.^3.*7.145239549149272e-1+xx.^3.*yy.^2.*3.193184083673463e+2-xx.^2.*yy.^4.*1.40779965937169e+2-xx.^3.*yy.^3.*1.013059778118534e+1-xx.^4.*yy.^2.*9.292071372439611e+2+xx.^2.*yy.^5.*2.992332140731769e-1-xx.^3.*yy.^4.*1.369974107594584e+2-xx.^4.*yy.^3.*1.294220577933953-xx.^5.*yy.^2.*6.874377148048132e+2+xx.^2.*yy.^6.*6.543517412058207+xx.^3.*yy.^5.*9.4787478195207+xx.^4.*yy.^4.*4.219568904511715e+2+xx.^5.*yy.^3.*1.604618144716224e+1+xx.^6.*yy.^2.*1.052720200159863e+3+xx.^2.*yy.^7.*3.440257778168581e-1+xx.^3.*yy.^6.*3.97973617078252+xx.^4.*yy.^5.*8.158402880998847e-1+xx.^5.*yy.^4.*2.976761849175189e+2+xx.^6.*yy.^3.*1.431304162141321+xx.^7.*yy.^2.*4.87380378442101e+2-xx.^2.*yy.^8.*9.031661549154107-xx.^3.*yy.^7.*5.380951726564079-xx.^4.*yy.^6.*1.613413488924491e+1-xx.^5.*yy.^5.*2.095373277916843e+1-xx.^6.*yy.^4.*4.672406815181154e+2-xx.^7.*yy.^3.*1.396213341785615e+1-xx.^8.*yy.^2.*3.994601481287452e+2-xx.^2.*yy.^9.*2.294996536301288e-1-xx.^3.*yy.^8.*1.429845294263658e+1-xx.^4.*yy.^7.*9.050942192417836e-1-xx.^5.*yy.^6.*1.728805725264949e+1-xx.^6.*yy.^5.*1.34544008057555e-1-xx.^7.*yy.^4.*1.978746300893805e+2-xx.^8.*yy.^3.*2.258089732983687e-1-xx.^9.*yy.^2.*1.016436433222759e+2+xx.^3.*yy.^9.*1.828012711482035+xx.^4.*yy.^8.*3.336707091297534e+1+xx.^5.*yy.^7.*1.59217667567015e+1+xx.^6.*yy.^6.*1.57263834379615e+1+xx.^7.*yy.^5.*2.306992085826472e+1+xx.^8.*yy.^4.*1.745855936499575e+2+xx.^9.*yy.^3.*5.058823046755644+xx.^4.*yy.^9.*5.981939447987676e-1+xx.^5.*yy.^8.*3.596210086309369e+1+xx.^6.*yy.^7.*1.112016367919001e-1+xx.^7.*yy.^6.*1.495088302611445e+1-xx.^8.*yy.^5.*4.545223953790024e-1+xx.^9.*yy.^4.*3.373349362223411e+1-xx.^5.*yy.^9.*5.481785841428752-xx.^6.*yy.^8.*4.129058490033813e+1-xx.^7.*yy.^7.*1.994978298913851e+1-xx.^8.*yy.^6.*5.268976105202482-xx.^9.*yy.^5.*9.463935378555124-xx.^6.*yy.^9.*3.818431611067075e-1-xx.^7.*yy.^8.*3.411790228342504e+1+xx.^8.*yy.^7.*3.655275161975917e-1-xx.^9.*yy.^6.*3.422670732987394+xx.^7.*yy.^9.*6.935438665851035+xx.^8.*yy.^8.*1.650057442285759e+1+xx.^9.*yy.^7.*8.679731905869081+xx.^8.*yy.^9.*1.417469705276344e-2+xx.^9.*yy.^8.*1.111802135132597e+1-xx.^9.*yy.^9.*3.053749060430634-xx.*yy.*1.358041539872225-xx.*yy.^2.*1.761743113711948e+1+xx.^2.*yy.*3.007646166548722e-1+xx.*yy.^3.*2.987672996272836+xx.^3.*yy.*4.204788976746628+xx.*yy.^4.*3.4624013480431+xx.^4.*yy.*7.852805642778767e-1-xx.*yy.^5.*2.130815820353545-xx.^5.*yy.*5.532429583266559+xx.*yy.^6.*1.780044557350331-xx.^6.*yy.*1.026118629770241+xx.*yy.^7.*7.290080029920991e-1+xx.^7.*yy.*3.906556882879037+xx.*yy.^8.*1.336261799653921+xx.^8.*yy.*3.006291554277033e-1-xx.*yy.^9.*2.278236390391508e-1-xx.^9.*yy.*1.220870513639053-xx.^2.*1.548574693140216e+2-xx.^3.*1.720022808360341e+2+xx.^4.*4.900173107690596e+2+xx.^5.*3.710874862768505e+2-xx.^6.*5.599153171793714e+2-xx.^7.*2.703387290954101e+2+xx.^8.*2.136429561611328e+2+xx.^9.*6.021479908170309e+1-yy.^2.*2.217850749090318e+1+yy.^3.*8.032281878547765e-1+yy.^4.*1.147823900997428e+1-yy.^5.*5.259371043980779e-1-yy.^6.*8.669015228839822e-1+yy.^7.*8.425893861929189e-2+yy.^8.*4.546501004086849e-1-yy.^9.*9.955346991849411e-4+1.11125199034042e+1).*(xx.*8.917450828091442e-1-yy.*1.832764070999146e-3-xx.^2.*yy.^2.*3.149250096599649+xx.^2.*yy.^3.*3.432275747499679e-1+xx.^3.*yy.^2.*7.108205033182954e+1+xx.^2.*yy.^4.*3.910407900960859-xx.^3.*yy.^3.*1.007615333683764+xx.^4.*yy.^2.*7.301846550389142e+1-xx.^2.*yy.^5.*5.774881479713465e-1-xx.^3.*yy.^4.*1.040150888639639e+2-xx.^4.*yy.^3.*4.127436011116915-xx.^5.*yy.^2.*5.064993011991733e+2-xx.^2.*yy.^6.*1.840393391604457+xx.^3.*yy.^5.*1.597111669874699-xx.^4.*yy.^4.*9.955144214033603e+1+xx.^5.*yy.^3.*2.138303646817599-xx.^6.*yy.^2.*4.921591873960447e+2+xx.^2.*yy.^7.*5.225563086072636e-1+xx.^3.*yy.^6.*6.988888963931489e+1+xx.^4.*yy.^5.*7.079509787256945+xx.^5.*yy.^4.*7.302234063822373e+2+xx.^6.*yy.^3.*1.863040142690569e+1+xx.^7.*yy.^2.*1.76818389645896e+3+xx.^2.*yy.^8.*2.453279080016533e-1-xx.^3.*yy.^7.*1.163087952436314+xx.^4.*yy.^6.*5.915918234243827e+1-xx.^5.*yy.^5.*3.35018410738197+xx.^6.*yy.^4.*6.841086500842017e+2+xx.^7.*yy.^3.*1.252957342057255+xx.^8.*yy.^2.*1.480467010634292e+3-xx.^2.*yy.^9.*3.032655221718485e-1-xx.^3.*yy.^8.*2.278036773045523e+1-xx.^4.*yy.^7.*6.723071064431262-xx.^5.*yy.^6.*4.795297487798922e+2-xx.^6.*yy.^5.*3.326364713317154e+1-xx.^7.*yy.^4.*2.521032212095309e+3-xx.^8.*yy.^3.*4.653269694282666e+1-xx.^9.*yy.^2.*3.447954066931935e+3-xx.^2.*yy.^10.*1.673760709754303e-1+xx.^3.*yy.^9.*3.536004285541229e-1-xx.^4.*yy.^8.*1.647455285154051e+1+xx.^5.*yy.^7.*1.959490888593118-xx.^6.*yy.^6.*4.244258590721315e+2-xx.^7.*yy.^5.*1.851249760126308-xx.^8.*yy.^4.*2.060464579497394e+3-xx.^9.*yy.^3.*1.15097316035386e+1-xx.^10.*yy.^2.*2.38844937500287e+3+xx.^2.*yy.^11.*1.285283229959356e-1+xx.^3.*yy.^10.*5.985563635425356+xx.^4.*yy.^9.*4.224198125183847+xx.^5.*yy.^8.*1.530130293824737e+2+xx.^6.*yy.^7.*3.420937255464183e+1+xx.^7.*yy.^6.*1.628542058641167e+3+xx.^8.*yy.^5.*8.744487892771101e+1+xx.^9.*yy.^4.*4.871207293139532e+3+xx.^10.*yy.^3.*7.1312618419082e+1+xx.^11.*yy.^2.*3.949541181898515e+3+xx.^2.*yy.^12.*1.088122026806739e-1-xx.^3.*yy.^11.*2.535201427281161e-2+xx.^4.*yy.^10.*5.9004576328881+xx.^5.*yy.^9.*2.41233360867424e-1+xx.^6.*yy.^8.*1.299219303681419e+2+xx.^7.*yy.^7.*3.651593703534549+xx.^8.*yy.^6.*1.289366818512573e+3+xx.^9.*yy.^5.*1.728631843992101e+1+xx.^10.*yy.^4.*3.302797117233668e+3+xx.^11.*yy.^3.*1.883167226905925e+1+xx.^12.*yy.^2.*2.213047026124823e+3-xx.^2.*yy.^13.*3.515509262970026e-2-xx.^3.*yy.^12.*1.990127958180967-xx.^4.*yy.^11.*1.899800493738188-xx.^5.*yy.^10.*4.316621149718254e+1-xx.^6.*yy.^9.*2.381209633537286e+1-xx.^7.*yy.^8.*5.144972151621673e+2-xx.^8.*yy.^7.*9.767466929700799e+1-xx.^9.*yy.^6.*3.106243948572863e+3-xx.^10.*yy.^5.*1.41702297922157e+2-xx.^11.*yy.^4.*5.533605835398259e+3-xx.^12.*yy.^3.*6.786183956102263e+1-xx.^13.*yy.^2.*2.639229675258195e+3+xx.^2.*yy.^14.*7.731813451389398e-4+xx.^3.*yy.^13.*4.865422726462125e-3-xx.^4.*yy.^12.*2.445679991191839-xx.^5.*yy.^11.*6.715940725269066e-1-xx.^6.*yy.^10.*4.507673288076278e+1-xx.^7.*yy.^9.*5.603093601746989-xx.^8.*yy.^8.*4.109282146089062e+2-xx.^9.*yy.^7.*1.753996470905003e+1-xx.^10.*yy.^6.*2.05796865030684e+3-xx.^11.*yy.^5.*2.793033132389915e+1-xx.^12.*yy.^4.*3.023652971671623e+3-xx.^13.*yy.^3.*1.446278259530199e+1-xx.^14.*yy.^2.*1.175938086326686e+3+xx.^2.*yy.^15.*5.01490593227162e-3+xx.^3.*yy.^14.*1.226130225377401e-1+xx.^4.*yy.^13.*5.205137916111856e-1+xx.^5.*yy.^12.*1.508082715349343e+1+xx.^6.*yy.^11.*1.135783574844549e+1+xx.^7.*yy.^10.*1.550603977802377e+2+xx.^8.*yy.^9.*7.38498642874362e+1+xx.^9.*yy.^8.*9.780906748278276e+2+xx.^10.*yy.^7.*1.703675468456969e+2+xx.^11.*yy.^6.*3.48881762178512e+3+xx.^12.*yy.^5.*1.428822558885717e+2+xx.^13.*yy.^4.*3.667162483559571e+3+xx.^14.*yy.^3.*3.837413530633986e+1+xx.^15.*yy.^2.*9.503660390569385e+2+xx.^2.*yy.^16.*5.861221821537304e-3-xx.^3.*yy.^15.*2.037315527441673e-4+xx.^4.*yy.^14.*7.64869899364752e-2+xx.^5.*yy.^13.*1.907444769558822e-1+xx.^6.*yy.^12.*1.708589308022411e+1+xx.^7.*yy.^11.*4.065934064451773+xx.^8.*yy.^10.*1.491040426535532e+2+xx.^9.*yy.^9.*1.595803178073279e+1+xx.^10.*yy.^8.*6.744049813455803e+2+xx.^11.*yy.^7.*2.607330069477239e+1+xx.^12.*yy.^6.*1.859959336144574e+3+xx.^13.*yy.^5.*2.106027647564672e+1+xx.^14.*yy.^4.*1.578290455337145e+3+xx.^15.*yy.^3.*5.404759849680721+xx.^16.*yy.^2.*3.312168568189724e+2-xx.^2.*yy.^17.*1.209189583631184e-3-xx.^3.*yy.^16.*5.542030145778944e-2-xx.^4.*yy.^15.*7.890299096297505e-2-xx.^5.*yy.^14.*8.483322346337942e-1-xx.^6.*yy.^13.*3.107942149637959-xx.^7.*yy.^12.*5.564407009824581e+1-xx.^8.*yy.^11.*3.650661663212293e+1-xx.^9.*yy.^10.*3.135855585359998e+2-xx.^10.*yy.^9.*1.365638754511626e+2-xx.^11.*yy.^8.*1.099176627885069e+3-xx.^12.*yy.^7.*1.829398379551916e+2-xx.^13.*yy.^6.*2.286445876513336e+3-xx.^14.*yy.^5.*8.599320413293898e+1-xx.^15.*yy.^4.*1.308610165671812e+3-xx.^16.*yy.^3.*1.145401808951412e+1-xx.^17.*yy.^2.*1.419636251155902e+2+xx.^2.*yy.^18.*8.813655028507696e-7-xx.^3.*yy.^17.*1.594025887336131e-3-xx.^4.*yy.^16.*1.074352580846769e-1-xx.^5.*yy.^15.*3.328937208257363e-2-xx.^6.*yy.^14.*7.772215192279019e-1-xx.^7.*yy.^13.*1.176397856728984-xx.^8.*yy.^12.*5.503214239313669e+1-xx.^9.*yy.^11.*1.006936419795361e+1-xx.^10.*yy.^10.*2.635384382933626e+2-xx.^11.*yy.^9.*2.135812279225621e+1-xx.^12.*yy.^8.*6.248915151960172e+2-xx.^13.*yy.^7.*1.892072024283776e+1-xx.^14.*yy.^6.*9.501742999811358e+2-xx.^15.*yy.^5.*7.651190531025566-xx.^16.*yy.^4.*4.335602806008366e+2-xx.^17.*yy.^3.*7.754902865214392e-1-xx.^18.*yy.^2.*3.805352147351891e+1+xx.^3.*yy.^18.*1.055806479643397e-4+xx.^4.*yy.^17.*2.113472311575987e-2+xx.^5.*yy.^16.*4.859441895485767e-1+xx.^6.*yy.^15.*5.04519123868697e-1+xx.^7.*yy.^14.*2.975139612246843+xx.^8.*yy.^13.*9.972525025258876+xx.^9.*yy.^12.*1.14241908354265e+2+xx.^10.*yy.^11.*6.878430806750447e+1+xx.^11.*yy.^10.*3.740510789006829e+2+xx.^12.*yy.^9.*1.526436852440644e+2+xx.^13.*yy.^8.*7.22397895624235e+2+xx.^14.*yy.^7.*1.164418673445259e+2+xx.^15.*yy.^6.*8.059991480707276e+2+xx.^16.*yy.^5.*2.767809505586303e+1+xx.^17.*yy.^4.*1.933951468944043e+2+xx.^18.*yy.^3.*1.308041198296645+xx.^4.*yy.^18.*1.053414956120493e-4+xx.^5.*yy.^17.*2.064844552181837e-2+xx.^6.*yy.^16.*7.311122078559425e-1+xx.^7.*yy.^15.*2.068006677205367e-1+xx.^8.*yy.^14.*2.929492444862385+xx.^9.*yy.^13.*2.988342727601186+xx.^10.*yy.^12.*9.644324674983939e+1+xx.^11.*yy.^11.*1.305508809759776e+1+xx.^12.*yy.^10.*2.681367496312035e+2+xx.^13.*yy.^9.*1.503082047430628e+1+xx.^14.*yy.^8.*3.278088783118031e+2+xx.^15.*yy.^7.*6.634680801390892+xx.^16.*yy.^6.*2.526711036194698e+2+xx.^17.*yy.^5.*1.045007940823613+xx.^18.*yy.^4.*4.812290504794675e+1-xx.^5.*yy.^18.*1.50178494658072e-3-xx.^6.*yy.^17.*1.444998993096548e-1-xx.^7.*yy.^16.*2.012430010644059-xx.^8.*yy.^15.*1.736908330974427-xx.^9.*yy.^14.*5.995675469831725-xx.^10.*yy.^13.*1.880438280990048e+1-xx.^11.*yy.^12.*1.374982347789386e+2-xx.^12.*yy.^11.*7.754411397871978e+1-xx.^13.*yy.^10.*2.610329616357622e+2-xx.^14.*yy.^9.*9.995500470504359e+1-xx.^15.*yy.^8.*2.556878311939802e+2-xx.^16.*yy.^7.*3.961883526311578e+1-xx.^17.*yy.^6.*1.173608324930028e+2-xx.^18.*yy.^5.*3.536053671430259-xx.^6.*yy.^18.*9.220149238483281e-4-xx.^7.*yy.^17.*1.014690476686303e-1-xx.^8.*yy.^16.*2.473189356253753-xx.^9.*yy.^15.*5.594697728012737e-1-xx.^10.*yy.^14.*5.664508747841497-xx.^11.*yy.^13.*3.965075348636596-xx.^12.*yy.^12.*9.783286253951298e+1-xx.^13.*yy.^11.*9.179583293626597-xx.^14.*yy.^10.*1.573007989970698e+2-xx.^15.*yy.^9.*5.235877836375165-xx.^16.*yy.^8.*9.009099148888656e+1-xx.^17.*yy.^7.*8.544704478967668e-1-xx.^18.*yy.^6.*2.674768472208937e+1+xx.^7.*yy.^18.*8.789660503979215e-3+xx.^8.*yy.^17.*5.154726443207739e-1+xx.^9.*yy.^16.*4.575501924068617+xx.^10.*yy.^15.*3.519392032862595+xx.^11.*yy.^14.*7.244553726468354+xx.^12.*yy.^13.*2.129145940801576e+1+xx.^13.*yy.^12.*9.652573649437794e+1+xx.^14.*yy.^11.*5.089115632054402e+1+xx.^15.*yy.^10.*9.845644712361996e+1+xx.^16.*yy.^9.*3.474525767319002e+1+xx.^17.*yy.^8.*3.73992298363824e+1+xx.^18.*yy.^7.*5.405894441477231+xx.^8.*yy.^18.*2.917787272284469e-3+xx.^9.*yy.^17.*2.572393452106676e-1+xx.^10.*yy.^16.*4.733102430610986+xx.^11.*yy.^15.*8.181721343591682e-1+xx.^12.*yy.^14.*6.193203199800339+xx.^13.*yy.^13.*2.853719379455096+xx.^14.*yy.^12.*5.718940055267839e+1+xx.^15.*yy.^11.*3.241086639512342+xx.^16.*yy.^10.*4.931962357420912e+1+xx.^17.*yy.^9.*6.747402570722794e-1+xx.^18.*yy.^8.*1.000453477214209e+1-xx.^9.*yy.^18.*2.770194324088346e-2-xx.^10.*yy.^17.*1.060768626920755-xx.^11.*yy.^16.*6.063659935013136-xx.^12.*yy.^15.*4.298729062320957-xx.^13.*yy.^14.*5.188023946675464-xx.^14.*yy.^13.*1.408951687993052e+1-xx.^15.*yy.^12.*3.658477349173497e+1-xx.^16.*yy.^11.*1.763694828691533e+1-xx.^17.*yy.^10.*1.546810666592484e+1-xx.^18.*yy.^9.*4.825340323808244-xx.^10.*yy.^18.*4.375685387384132e-3-xx.^11.*yy.^17.*3.713267341545781e-1-xx.^12.*yy.^16.*5.390084222106306-xx.^13.*yy.^15.*6.738582988011823e-1-xx.^14.*yy.^14.*3.859376170867516-xx.^15.*yy.^13.*1.037177872154021-xx.^16.*yy.^12.*1.775828191771638e+1-xx.^17.*yy.^11.*4.29668961753619e-1-xx.^18.*yy.^10.*6.377690249692412+xx.^11.*yy.^18.*5.061696088482958e-2+xx.^12.*yy.^17.*1.300627194368403+xx.^13.*yy.^16.*4.682344463791613+xx.^14.*yy.^15.*3.094039065852764+xx.^15.*yy.^14.*2.03153119138446+xx.^16.*yy.^13.*4.946110325242825+xx.^17.*yy.^12.*5.777902331673031+xx.^18.*yy.^11.*2.424963328716446+xx.^12.*yy.^18.*3.183114231013491e-3+xx.^13.*yy.^17.*3.092145947884248e-1+xx.^14.*yy.^16.*3.629527888134607+xx.^15.*yy.^15.*2.949491814312678e-1+xx.^16.*yy.^14.*1.2714196413809+xx.^17.*yy.^13.*1.440966441698496e-1+xx.^18.*yy.^12.*2.241647785000835-xx.^13.*yy.^18.*5.349374321560299e-2-xx.^14.*yy.^17.*9.33783004746455e-1-xx.^15.*yy.^16.*1.957315224018444-xx.^16.*yy.^15.*1.199954149395863-xx.^17.*yy.^14.*3.355010021173755e-1-xx.^18.*yy.^13.*6.934728168026845e-1-xx.^14.*yy.^18.*9.373212372286827e-4-xx.^15.*yy.^17.*1.387400101197578e-1-xx.^16.*yy.^16.*1.336780615484007-xx.^17.*yy.^15.*5.351190538689366e-2-xx.^18.*yy.^14.*1.702723527279216e-1+xx.^15.*yy.^18.*3.026462613229377e-2+xx.^16.*yy.^17.*3.601327004082595e-1+xx.^17.*yy.^16.*3.430316844923598e-1+xx.^18.*yy.^15.*1.915157980525296e-1+xx.^16.*yy.^18.*2.672769955889301e-5+xx.^17.*yy.^17.*2.60341252165812e-2+xx.^18.*yy.^16.*2.078858690727986e-1-xx.^17.*yy.^18.*7.079740141201421e-3-xx.^18.*yy.^17.*5.710577672108429e-2+xx.^18.*yy.^18.*1.167810588291038e-6-xx.*yy.*3.075366976262442e-2-xx.*yy.^2.*3.526499241348434-xx.^2.*yy.*8.22091599289123e-2+xx.*yy.^3.*1.279267114308256e-1+xx.^3.*yy.*2.422755366776858e-1+xx.*yy.^4.*5.274972053599984+xx.^4.*yy.*9.838541330816038e-1-xx.*yy.^5.*2.057588038303203e-1-xx.^5.*yy.*4.953532667643909e-1-xx.*yy.^6.*3.667311777247011-xx.^6.*yy.*4.373943336369689+xx.*yy.^7.*1.591772639121506e-1-xx.^7.*yy.*4.450755114932008e-1+xx.*yy.^8.*1.241212300797983+xx.^8.*yy.*1.066815031820515e+1-xx.*yy.^9.*6.133207109844262e-2+xx.^9.*yy.*3.188597989877851-xx.*yy.^10.*3.006491051813672e-1-xx.^10.*yy.*1.585254055500515e+1+xx.*yy.^11.*1.34537384760043e-2-xx.^11.*yy.*5.153376996842015+xx.*yy.^12.*9.083199337053412e-2+xx.^12.*yy.*1.452649282223464e+1-xx.*yy.^13.*3.117573298460605e-3+xx.^13.*yy.*3.98291350637101-xx.*yy.^14.*6.304899409665063e-3-xx.^14.*yy.*7.82968931460302+xx.*yy.^15.*4.110970690634906e-4-xx.^15.*yy.*1.512490222340712+xx.*yy.^16.*2.003209230634498e-3+xx.^16.*yy.*2.180160034236967-xx.*yy.^17.*6.692898196101731e-6+xx.^17.*yy.*2.232626342763958e-1+xx.*yy.^18.*3.833781977872521e-7-xx.^18.*yy.*2.184421777805796e-1+xx.^2.*8.858362630041713e-1-xx.^3.*1.82382173556976e+1-xx.^4.*1.957558756949681e+1+xx.^5.*1.312418883880755e+2+xx.^6.*1.305923371426672e+2-xx.^7.*4.615843547867497e+2-xx.^8.*3.929721561768615e+2+xx.^9.*9.056915732081774e+2+xx.^10.*6.372469002766035e+2-xx.^11.*1.043360695274391e+3-xx.^12.*5.955720645853718e+2+xx.^13.*7.011815709552087e+2+xx.^14.*3.203552367072348e+2-xx.^15.*2.540433444872568e+2-xx.^16.*9.173269575880823e+1+xx.^17.*3.82198342698243e+1+xx.^18.*1.077219415605556e+1+yy.^2.*6.121374088507809e-5+yy.^3.*7.566679105625542e-3-yy.^4.*2.616937320847826e-4-yy.^5.*1.204865172584651e-2+yy.^6.*4.468547430148061e-4+yy.^7.*9.176084750846805e-3-yy.^8.*3.785602968701871e-4-yy.^9.*3.422992169154646e-3+yy.^10.*1.62999960348087e-4+yy.^11.*6.876030356471064e-4-yy.^12.*3.352881389468098e-5-yy.^13.*1.388009800634545e-4+yy.^14.*3.333314996184432e-6+yy.^15.*1.360695926359456e-5-yy.^16.*1.655644414705918e-7-yy.^17.*7.64905319289316e-7+yy.^18.*1.674878549087182e-9-4.550268315834584e-7).^2.*(-8.845979223770551e-5));
integral2(g,-1,1,-1,1)Any suggestion to increase the calculation speed of this integral2?
g = @(xx,yy)sqrt((xx.*1.103872343207215e+1-yy.*3.605544873768034e-1+xx.^2.*yy.^2.*2.981255793882863e+2-xx.^2.*yy.^3.*7.145239549149272e-1+xx.^3.*yy.^2.*3.193184083673463e+2-xx.^2.*yy.^4.*1.40779965937169e+2-xx.^3.*yy.^3.*1.013059778118534e+1-xx.^4.*yy.^2.*9.292071372439611e+2+xx.^2.*yy.^5.*2.992332140731769e-1-xx.^3.*yy.^4.*1.369974107594584e+2-xx.^4.*yy.^3.*1.294220577933953-xx.^5.*yy.^2.*6.874377148048132e+2+xx.^2.*yy.^6.*6.543517412058207+xx.^3.*yy.^5.*9.4787478195207+xx.^4.*yy.^4.*4.219568904511715e+2+xx.^5.*yy.^3.*1.604618144716224e+1+xx.^6.*yy.^2.*1.052720200159863e+3+xx.^2.*yy.^7.*3.440257778168581e-1+xx.^3.*yy.^6.*3.97973617078252+xx.^4.*yy.^5.*8.158402880998847e-1+xx.^5.*yy.^4.*2.976761849175189e+2+xx.^6.*yy.^3.*1.431304162141321+xx.^7.*yy.^2.*4.87380378442101e+2-xx.^2.*yy.^8.*9.031661549154107-xx.^3.*yy.^7.*5.380951726564079-xx.^4.*yy.^6.*1.613413488924491e+1-xx.^5.*yy.^5.*2.095373277916843e+1-xx.^6.*yy.^4.*4.672406815181154e+2-xx.^7.*yy.^3.*1.396213341785615e+1-xx.^8.*yy.^2.*3.994601481287452e+2-xx.^2.*yy.^9.*2.294996536301288e-1-xx.^3.*yy.^8.*1.429845294263658e+1-xx.^4.*yy.^7.*9.050942192417836e-1-xx.^5.*yy.^6.*1.728805725264949e+1-xx.^6.*yy.^5.*1.34544008057555e-1-xx.^7.*yy.^4.*1.978746300893805e+2-xx.^8.*yy.^3.*2.258089732983687e-1-xx.^9.*yy.^2.*1.016436433222759e+2+xx.^3.*yy.^9.*1.828012711482035+xx.^4.*yy.^8.*3.336707091297534e+1+xx.^5.*yy.^7.*1.59217667567015e+1+xx.^6.*yy.^6.*1.57263834379615e+1+xx.^7.*yy.^5.*2.306992085826472e+1+xx.^8.*yy.^4.*1.745855936499575e+2+xx.^9.*yy.^3.*5.058823046755644+xx.^4.*yy.^9.*5.981939447987676e-1+xx.^5.*yy.^8.*3.596210086309369e+1+xx.^6.*yy.^7.*1.112016367919001e-1+xx.^7.*yy.^6.*1.495088302611445e+1-xx.^8.*yy.^5.*4.545223953790024e-1+xx.^9.*yy.^4.*3.373349362223411e+1-xx.^5.*yy.^9.*5.481785841428752-xx.^6.*yy.^8.*4.129058490033813e+1-xx.^7.*yy.^7.*1.994978298913851e+1-xx.^8.*yy.^6.*5.268976105202482-xx.^9.*yy.^5.*9.463935378555124-xx.^6.*yy.^9.*3.818431611067075e-1-xx.^7.*yy.^8.*3.411790228342504e+1+xx.^8.*yy.^7.*3.655275161975917e-1-xx.^9.*yy.^6.*3.422670732987394+xx.^7.*yy.^9.*6.935438665851035+xx.^8.*yy.^8.*1.650057442285759e+1+xx.^9.*yy.^7.*8.679731905869081+xx.^8.*yy.^9.*1.417469705276344e-2+xx.^9.*yy.^8.*1.111802135132597e+1-xx.^9.*yy.^9.*3.053749060430634-xx.*yy.*1.358041539872225-xx.*yy.^2.*1.761743113711948e+1+xx.^2.*yy.*3.007646166548722e-1+xx.*yy.^3.*2.987672996272836+xx.^3.*yy.*4.204788976746628+xx.*yy.^4.*3.4624013480431+xx.^4.*yy.*7.852805642778767e-1-xx.*yy.^5.*2.130815820353545-xx.^5.*yy.*5.532429583266559+xx.*yy.^6.*1.780044557350331-xx.^6.*yy.*1.026118629770241+xx.*yy.^7.*7.290080029920991e-1+xx.^7.*yy.*3.906556882879037+xx.*yy.^8.*1.336261799653921+xx.^8.*yy.*3.006291554277033e-1-xx.*yy.^9.*2.278236390391508e-1-xx.^9.*yy.*1.220870513639053-xx.^2.*1.548574693140216e+2-xx.^3.*1.720022808360341e+2+xx.^4.*4.900173107690596e+2+xx.^5.*3.710874862768505e+2-xx.^6.*5.599153171793714e+2-xx.^7.*2.703387290954101e+2+xx.^8.*2.136429561611328e+2+xx.^9.*6.021479908170309e+1-yy.^2.*2.217850749090318e+1+yy.^3.*8.032281878547765e-1+yy.^4.*1.147823900997428e+1-yy.^5.*5.259371043980779e-1-yy.^6.*8.669015228839822e-1+yy.^7.*8.425893861929189e-2+yy.^8.*4.546501004086849e-1-yy.^9.*9.955346991849411e-4+1.11125199034042e+1).*(xx.*8.917450828091442e-1-yy.*1.832764070999146e-3-xx.^2.*yy.^2.*3.149250096599649+xx.^2.*yy.^3.*3.432275747499679e-1+xx.^3.*yy.^2.*7.108205033182954e+1+xx.^2.*yy.^4.*3.910407900960859-xx.^3.*yy.^3.*1.007615333683764+xx.^4.*yy.^2.*7.301846550389142e+1-xx.^2.*yy.^5.*5.774881479713465e-1-xx.^3.*yy.^4.*1.040150888639639e+2-xx.^4.*yy.^3.*4.127436011116915-xx.^5.*yy.^2.*5.064993011991733e+2-xx.^2.*yy.^6.*1.840393391604457+xx.^3.*yy.^5.*1.597111669874699-xx.^4.*yy.^4.*9.955144214033603e+1+xx.^5.*yy.^3.*2.138303646817599-xx.^6.*yy.^2.*4.921591873960447e+2+xx.^2.*yy.^7.*5.225563086072636e-1+xx.^3.*yy.^6.*6.988888963931489e+1+xx.^4.*yy.^5.*7.079509787256945+xx.^5.*yy.^4.*7.302234063822373e+2+xx.^6.*yy.^3.*1.863040142690569e+1+xx.^7.*yy.^2.*1.76818389645896e+3+xx.^2.*yy.^8.*2.453279080016533e-1-xx.^3.*yy.^7.*1.163087952436314+xx.^4.*yy.^6.*5.915918234243827e+1-xx.^5.*yy.^5.*3.35018410738197+xx.^6.*yy.^4.*6.841086500842017e+2+xx.^7.*yy.^3.*1.252957342057255+xx.^8.*yy.^2.*1.480467010634292e+3-xx.^2.*yy.^9.*3.032655221718485e-1-xx.^3.*yy.^8.*2.278036773045523e+1-xx.^4.*yy.^7.*6.723071064431262-xx.^5.*yy.^6.*4.795297487798922e+2-xx.^6.*yy.^5.*3.326364713317154e+1-xx.^7.*yy.^4.*2.521032212095309e+3-xx.^8.*yy.^3.*4.653269694282666e+1-xx.^9.*yy.^2.*3.447954066931935e+3-xx.^2.*yy.^10.*1.673760709754303e-1+xx.^3.*yy.^9.*3.536004285541229e-1-xx.^4.*yy.^8.*1.647455285154051e+1+xx.^5.*yy.^7.*1.959490888593118-xx.^6.*yy.^6.*4.244258590721315e+2-xx.^7.*yy.^5.*1.851249760126308-xx.^8.*yy.^4.*2.060464579497394e+3-xx.^9.*yy.^3.*1.15097316035386e+1-xx.^10.*yy.^2.*2.38844937500287e+3+xx.^2.*yy.^11.*1.285283229959356e-1+xx.^3.*yy.^10.*5.985563635425356+xx.^4.*yy.^9.*4.224198125183847+xx.^5.*yy.^8.*1.530130293824737e+2+xx.^6.*yy.^7.*3.420937255464183e+1+xx.^7.*yy.^6.*1.628542058641167e+3+xx.^8.*yy.^5.*8.744487892771101e+1+xx.^9.*yy.^4.*4.871207293139532e+3+xx.^10.*yy.^3.*7.1312618419082e+1+xx.^11.*yy.^2.*3.949541181898515e+3+xx.^2.*yy.^12.*1.088122026806739e-1-xx.^3.*yy.^11.*2.535201427281161e-2+xx.^4.*yy.^10.*5.9004576328881+xx.^5.*yy.^9.*2.41233360867424e-1+xx.^6.*yy.^8.*1.299219303681419e+2+xx.^7.*yy.^7.*3.651593703534549+xx.^8.*yy.^6.*1.289366818512573e+3+xx.^9.*yy.^5.*1.728631843992101e+1+xx.^10.*yy.^4.*3.302797117233668e+3+xx.^11.*yy.^3.*1.883167226905925e+1+xx.^12.*yy.^2.*2.213047026124823e+3-xx.^2.*yy.^13.*3.515509262970026e-2-xx.^3.*yy.^12.*1.990127958180967-xx.^4.*yy.^11.*1.899800493738188-xx.^5.*yy.^10.*4.316621149718254e+1-xx.^6.*yy.^9.*2.381209633537286e+1-xx.^7.*yy.^8.*5.144972151621673e+2-xx.^8.*yy.^7.*9.767466929700799e+1-xx.^9.*yy.^6.*3.106243948572863e+3-xx.^10.*yy.^5.*1.41702297922157e+2-xx.^11.*yy.^4.*5.533605835398259e+3-xx.^12.*yy.^3.*6.786183956102263e+1-xx.^13.*yy.^2.*2.639229675258195e+3+xx.^2.*yy.^14.*7.731813451389398e-4+xx.^3.*yy.^13.*4.865422726462125e-3-xx.^4.*yy.^12.*2.445679991191839-xx.^5.*yy.^11.*6.715940725269066e-1-xx.^6.*yy.^10.*4.507673288076278e+1-xx.^7.*yy.^9.*5.603093601746989-xx.^8.*yy.^8.*4.109282146089062e+2-xx.^9.*yy.^7.*1.753996470905003e+1-xx.^10.*yy.^6.*2.05796865030684e+3-xx.^11.*yy.^5.*2.793033132389915e+1-xx.^12.*yy.^4.*3.023652971671623e+3-xx.^13.*yy.^3.*1.446278259530199e+1-xx.^14.*yy.^2.*1.175938086326686e+3+xx.^2.*yy.^15.*5.01490593227162e-3+xx.^3.*yy.^14.*1.226130225377401e-1+xx.^4.*yy.^13.*5.205137916111856e-1+xx.^5.*yy.^12.*1.508082715349343e+1+xx.^6.*yy.^11.*1.135783574844549e+1+xx.^7.*yy.^10.*1.550603977802377e+2+xx.^8.*yy.^9.*7.38498642874362e+1+xx.^9.*yy.^8.*9.780906748278276e+2+xx.^10.*yy.^7.*1.703675468456969e+2+xx.^11.*yy.^6.*3.48881762178512e+3+xx.^12.*yy.^5.*1.428822558885717e+2+xx.^13.*yy.^4.*3.667162483559571e+3+xx.^14.*yy.^3.*3.837413530633986e+1+xx.^15.*yy.^2.*9.503660390569385e+2+xx.^2.*yy.^16.*5.861221821537304e-3-xx.^3.*yy.^15.*2.037315527441673e-4+xx.^4.*yy.^14.*7.64869899364752e-2+xx.^5.*yy.^13.*1.907444769558822e-1+xx.^6.*yy.^12.*1.708589308022411e+1+xx.^7.*yy.^11.*4.065934064451773+xx.^8.*yy.^10.*1.491040426535532e+2+xx.^9.*yy.^9.*1.595803178073279e+1+xx.^10.*yy.^8.*6.744049813455803e+2+xx.^11.*yy.^7.*2.607330069477239e+1+xx.^12.*yy.^6.*1.859959336144574e+3+xx.^13.*yy.^5.*2.106027647564672e+1+xx.^14.*yy.^4.*1.578290455337145e+3+xx.^15.*yy.^3.*5.404759849680721+xx.^16.*yy.^2.*3.312168568189724e+2-xx.^2.*yy.^17.*1.209189583631184e-3-xx.^3.*yy.^16.*5.542030145778944e-2-xx.^4.*yy.^15.*7.890299096297505e-2-xx.^5.*yy.^14.*8.483322346337942e-1-xx.^6.*yy.^13.*3.107942149637959-xx.^7.*yy.^12.*5.564407009824581e+1-xx.^8.*yy.^11.*3.650661663212293e+1-xx.^9.*yy.^10.*3.135855585359998e+2-xx.^10.*yy.^9.*1.365638754511626e+2-xx.^11.*yy.^8.*1.099176627885069e+3-xx.^12.*yy.^7.*1.829398379551916e+2-xx.^13.*yy.^6.*2.286445876513336e+3-xx.^14.*yy.^5.*8.599320413293898e+1-xx.^15.*yy.^4.*1.308610165671812e+3-xx.^16.*yy.^3.*1.145401808951412e+1-xx.^17.*yy.^2.*1.419636251155902e+2+xx.^2.*yy.^18.*8.813655028507696e-7-xx.^3.*yy.^17.*1.594025887336131e-3-xx.^4.*yy.^16.*1.074352580846769e-1-xx.^5.*yy.^15.*3.328937208257363e-2-xx.^6.*yy.^14.*7.772215192279019e-1-xx.^7.*yy.^13.*1.176397856728984-xx.^8.*yy.^12.*5.503214239313669e+1-xx.^9.*yy.^11.*1.006936419795361e+1-xx.^10.*yy.^10.*2.635384382933626e+2-xx.^11.*yy.^9.*2.135812279225621e+1-xx.^12.*yy.^8.*6.248915151960172e+2-xx.^13.*yy.^7.*1.892072024283776e+1-xx.^14.*yy.^6.*9.501742999811358e+2-xx.^15.*yy.^5.*7.651190531025566-xx.^16.*yy.^4.*4.335602806008366e+2-xx.^17.*yy.^3.*7.754902865214392e-1-xx.^18.*yy.^2.*3.805352147351891e+1+xx.^3.*yy.^18.*1.055806479643397e-4+xx.^4.*yy.^17.*2.113472311575987e-2+xx.^5.*yy.^16.*4.859441895485767e-1+xx.^6.*yy.^15.*5.04519123868697e-1+xx.^7.*yy.^14.*2.975139612246843+xx.^8.*yy.^13.*9.972525025258876+xx.^9.*yy.^12.*1.14241908354265e+2+xx.^10.*yy.^11.*6.878430806750447e+1+xx.^11.*yy.^10.*3.740510789006829e+2+xx.^12.*yy.^9.*1.526436852440644e+2+xx.^13.*yy.^8.*7.22397895624235e+2+xx.^14.*yy.^7.*1.164418673445259e+2+xx.^15.*yy.^6.*8.059991480707276e+2+xx.^16.*yy.^5.*2.767809505586303e+1+xx.^17.*yy.^4.*1.933951468944043e+2+xx.^18.*yy.^3.*1.308041198296645+xx.^4.*yy.^18.*1.053414956120493e-4+xx.^5.*yy.^17.*2.064844552181837e-2+xx.^6.*yy.^16.*7.311122078559425e-1+xx.^7.*yy.^15.*2.068006677205367e-1+xx.^8.*yy.^14.*2.929492444862385+xx.^9.*yy.^13.*2.988342727601186+xx.^10.*yy.^12.*9.644324674983939e+1+xx.^11.*yy.^11.*1.305508809759776e+1+xx.^12.*yy.^10.*2.681367496312035e+2+xx.^13.*yy.^9.*1.503082047430628e+1+xx.^14.*yy.^8.*3.278088783118031e+2+xx.^15.*yy.^7.*6.634680801390892+xx.^16.*yy.^6.*2.526711036194698e+2+xx.^17.*yy.^5.*1.045007940823613+xx.^18.*yy.^4.*4.812290504794675e+1-xx.^5.*yy.^18.*1.50178494658072e-3-xx.^6.*yy.^17.*1.444998993096548e-1-xx.^7.*yy.^16.*2.012430010644059-xx.^8.*yy.^15.*1.736908330974427-xx.^9.*yy.^14.*5.995675469831725-xx.^10.*yy.^13.*1.880438280990048e+1-xx.^11.*yy.^12.*1.374982347789386e+2-xx.^12.*yy.^11.*7.754411397871978e+1-xx.^13.*yy.^10.*2.610329616357622e+2-xx.^14.*yy.^9.*9.995500470504359e+1-xx.^15.*yy.^8.*2.556878311939802e+2-xx.^16.*yy.^7.*3.961883526311578e+1-xx.^17.*yy.^6.*1.173608324930028e+2-xx.^18.*yy.^5.*3.536053671430259-xx.^6.*yy.^18.*9.220149238483281e-4-xx.^7.*yy.^17.*1.014690476686303e-1-xx.^8.*yy.^16.*2.473189356253753-xx.^9.*yy.^15.*5.594697728012737e-1-xx.^10.*yy.^14.*5.664508747841497-xx.^11.*yy.^13.*3.965075348636596-xx.^12.*yy.^12.*9.783286253951298e+1-xx.^13.*yy.^11.*9.179583293626597-xx.^14.*yy.^10.*1.573007989970698e+2-xx.^15.*yy.^9.*5.235877836375165-xx.^16.*yy.^8.*9.009099148888656e+1-xx.^17.*yy.^7.*8.544704478967668e-1-xx.^18.*yy.^6.*2.674768472208937e+1+xx.^7.*yy.^18.*8.789660503979215e-3+xx.^8.*yy.^17.*5.154726443207739e-1+xx.^9.*yy.^16.*4.575501924068617+xx.^10.*yy.^15.*3.519392032862595+xx.^11.*yy.^14.*7.244553726468354+xx.^12.*yy.^13.*2.129145940801576e+1+xx.^13.*yy.^12.*9.652573649437794e+1+xx.^14.*yy.^11.*5.089115632054402e+1+xx.^15.*yy.^10.*9.845644712361996e+1+xx.^16.*yy.^9.*3.474525767319002e+1+xx.^17.*yy.^8.*3.73992298363824e+1+xx.^18.*yy.^7.*5.405894441477231+xx.^8.*yy.^18.*2.917787272284469e-3+xx.^9.*yy.^17.*2.572393452106676e-1+xx.^10.*yy.^16.*4.733102430610986+xx.^11.*yy.^15.*8.181721343591682e-1+xx.^12.*yy.^14.*6.193203199800339+xx.^13.*yy.^13.*2.853719379455096+xx.^14.*yy.^12.*5.718940055267839e+1+xx.^15.*yy.^11.*3.241086639512342+xx.^16.*yy.^10.*4.931962357420912e+1+xx.^17.*yy.^9.*6.747402570722794e-1+xx.^18.*yy.^8.*1.000453477214209e+1-xx.^9.*yy.^18.*2.770194324088346e-2-xx.^10.*yy.^17.*1.060768626920755-xx.^11.*yy.^16.*6.063659935013136-xx.^12.*yy.^15.*4.298729062320957-xx.^13.*yy.^14.*5.188023946675464-xx.^14.*yy.^13.*1.408951687993052e+1-xx.^15.*yy.^12.*3.658477349173497e+1-xx.^16.*yy.^11.*1.763694828691533e+1-xx.^17.*yy.^10.*1.546810666592484e+1-xx.^18.*yy.^9.*4.825340323808244-xx.^10.*yy.^18.*4.375685387384132e-3-xx.^11.*yy.^17.*3.713267341545781e-1-xx.^12.*yy.^16.*5.390084222106306-xx.^13.*yy.^15.*6.738582988011823e-1-xx.^14.*yy.^14.*3.859376170867516-xx.^15.*yy.^13.*1.037177872154021-xx.^16.*yy.^12.*1.775828191771638e+1-xx.^17.*yy.^11.*4.29668961753619e-1-xx.^18.*yy.^10.*6.377690249692412+xx.^11.*yy.^18.*5.061696088482958e-2+xx.^12.*yy.^17.*1.300627194368403+xx.^13.*yy.^16.*4.682344463791613+xx.^14.*yy.^15.*3.094039065852764+xx.^15.*yy.^14.*2.03153119138446+xx.^16.*yy.^13.*4.946110325242825+xx.^17.*yy.^12.*5.777902331673031+xx.^18.*yy.^11.*2.424963328716446+xx.^12.*yy.^18.*3.183114231013491e-3+xx.^13.*yy.^17.*3.092145947884248e-1+xx.^14.*yy.^16.*3.629527888134607+xx.^15.*yy.^15.*2.949491814312678e-1+xx.^16.*yy.^14.*1.2714196413809+xx.^17.*yy.^13.*1.440966441698496e-1+xx.^18.*yy.^12.*2.241647785000835-xx.^13.*yy.^18.*5.349374321560299e-2-xx.^14.*yy.^17.*9.33783004746455e-1-xx.^15.*yy.^16.*1.957315224018444-xx.^16.*yy.^15.*1.199954149395863-xx.^17.*yy.^14.*3.355010021173755e-1-xx.^18.*yy.^13.*6.934728168026845e-1-xx.^14.*yy.^18.*9.373212372286827e-4-xx.^15.*yy.^17.*1.387400101197578e-1-xx.^16.*yy.^16.*1.336780615484007-xx.^17.*yy.^15.*5.351190538689366e-2-xx.^18.*yy.^14.*1.702723527279216e-1+xx.^15.*yy.^18.*3.026462613229377e-2+xx.^16.*yy.^17.*3.601327004082595e-1+xx.^17.*yy.^16.*3.430316844923598e-1+xx.^18.*yy.^15.*1.915157980525296e-1+xx.^16.*yy.^18.*2.672769955889301e-5+xx.^17.*yy.^17.*2.60341252165812e-2+xx.^18.*yy.^16.*2.078858690727986e-1-xx.^17.*yy.^18.*7.079740141201421e-3-xx.^18.*yy.^17.*5.710577672108429e-2+xx.^18.*yy.^18.*1.167810588291038e-6-xx.*yy.*3.075366976262442e-2-xx.*yy.^2.*3.526499241348434-xx.^2.*yy.*8.22091599289123e-2+xx.*yy.^3.*1.279267114308256e-1+xx.^3.*yy.*2.422755366776858e-1+xx.*yy.^4.*5.274972053599984+xx.^4.*yy.*9.838541330816038e-1-xx.*yy.^5.*2.057588038303203e-1-xx.^5.*yy.*4.953532667643909e-1-xx.*yy.^6.*3.667311777247011-xx.^6.*yy.*4.373943336369689+xx.*yy.^7.*1.591772639121506e-1-xx.^7.*yy.*4.450755114932008e-1+xx.*yy.^8.*1.241212300797983+xx.^8.*yy.*1.066815031820515e+1-xx.*yy.^9.*6.133207109844262e-2+xx.^9.*yy.*3.188597989877851-xx.*yy.^10.*3.006491051813672e-1-xx.^10.*yy.*1.585254055500515e+1+xx.*yy.^11.*1.34537384760043e-2-xx.^11.*yy.*5.153376996842015+xx.*yy.^12.*9.083199337053412e-2+xx.^12.*yy.*1.452649282223464e+1-xx.*yy.^13.*3.117573298460605e-3+xx.^13.*yy.*3.98291350637101-xx.*yy.^14.*6.304899409665063e-3-xx.^14.*yy.*7.82968931460302+xx.*yy.^15.*4.110970690634906e-4-xx.^15.*yy.*1.512490222340712+xx.*yy.^16.*2.003209230634498e-3+xx.^16.*yy.*2.180160034236967-xx.*yy.^17.*6.692898196101731e-6+xx.^17.*yy.*2.232626342763958e-1+xx.*yy.^18.*3.833781977872521e-7-xx.^18.*yy.*2.184421777805796e-1+xx.^2.*8.858362630041713e-1-xx.^3.*1.82382173556976e+1-xx.^4.*1.957558756949681e+1+xx.^5.*1.312418883880755e+2+xx.^6.*1.305923371426672e+2-xx.^7.*4.615843547867497e+2-xx.^8.*3.929721561768615e+2+xx.^9.*9.056915732081774e+2+xx.^10.*6.372469002766035e+2-xx.^11.*1.043360695274391e+3-xx.^12.*5.955720645853718e+2+xx.^13.*7.011815709552087e+2+xx.^14.*3.203552367072348e+2-xx.^15.*2.540433444872568e+2-xx.^16.*9.173269575880823e+1+xx.^17.*3.82198342698243e+1+xx.^18.*1.077219415605556e+1+yy.^2.*6.121374088507809e-5+yy.^3.*7.566679105625542e-3-yy.^4.*2.616937320847826e-4-yy.^5.*1.204865172584651e-2+yy.^6.*4.468547430148061e-4+yy.^7.*9.176084750846805e-3-yy.^8.*3.785602968701871e-4-yy.^9.*3.422992169154646e-3+yy.^10.*1.62999960348087e-4+yy.^11.*6.876030356471064e-4-yy.^12.*3.352881389468098e-5-yy.^13.*1.388009800634545e-4+yy.^14.*3.333314996184432e-6+yy.^15.*1.360695926359456e-5-yy.^16.*1.655644414705918e-7-yy.^17.*7.64905319289316e-7+yy.^18.*1.674878549087182e-9-4.550268315834584e-7).^2.*(-8.845979223770551e-5));
integral2(g,-1,1,-1,1) Any suggestion to increase the calculation speed of this integral2?
g = @(xx,yy)sqrt((xx.*1.103872343207215e+1-yy.*3.605544873768034e-1+xx.^2.*yy.^2.*2.981255793882863e+2-xx.^2.*yy.^3.*7.145239549149272e-1+xx.^3.*yy.^2.*3.193184083673463e+2-xx.^2.*yy.^4.*1.40779965937169e+2-xx.^3.*yy.^3.*1.013059778118534e+1-xx.^4.*yy.^2.*9.292071372439611e+2+xx.^2.*yy.^5.*2.992332140731769e-1-xx.^3.*yy.^4.*1.369974107594584e+2-xx.^4.*yy.^3.*1.294220577933953-xx.^5.*yy.^2.*6.874377148048132e+2+xx.^2.*yy.^6.*6.543517412058207+xx.^3.*yy.^5.*9.4787478195207+xx.^4.*yy.^4.*4.219568904511715e+2+xx.^5.*yy.^3.*1.604618144716224e+1+xx.^6.*yy.^2.*1.052720200159863e+3+xx.^2.*yy.^7.*3.440257778168581e-1+xx.^3.*yy.^6.*3.97973617078252+xx.^4.*yy.^5.*8.158402880998847e-1+xx.^5.*yy.^4.*2.976761849175189e+2+xx.^6.*yy.^3.*1.431304162141321+xx.^7.*yy.^2.*4.87380378442101e+2-xx.^2.*yy.^8.*9.031661549154107-xx.^3.*yy.^7.*5.380951726564079-xx.^4.*yy.^6.*1.613413488924491e+1-xx.^5.*yy.^5.*2.095373277916843e+1-xx.^6.*yy.^4.*4.672406815181154e+2-xx.^7.*yy.^3.*1.396213341785615e+1-xx.^8.*yy.^2.*3.994601481287452e+2-xx.^2.*yy.^9.*2.294996536301288e-1-xx.^3.*yy.^8.*1.429845294263658e+1-xx.^4.*yy.^7.*9.050942192417836e-1-xx.^5.*yy.^6.*1.728805725264949e+1-xx.^6.*yy.^5.*1.34544008057555e-1-xx.^7.*yy.^4.*1.978746300893805e+2-xx.^8.*yy.^3.*2.258089732983687e-1-xx.^9.*yy.^2.*1.016436433222759e+2+xx.^3.*yy.^9.*1.828012711482035+xx.^4.*yy.^8.*3.336707091297534e+1+xx.^5.*yy.^7.*1.59217667567015e+1+xx.^6.*yy.^6.*1.57263834379615e+1+xx.^7.*yy.^5.*2.306992085826472e+1+xx.^8.*yy.^4.*1.745855936499575e+2+xx.^9.*yy.^3.*5.058823046755644+xx.^4.*yy.^9.*5.981939447987676e-1+xx.^5.*yy.^8.*3.596210086309369e+1+xx.^6.*yy.^7.*1.112016367919001e-1+xx.^7.*yy.^6.*1.495088302611445e+1-xx.^8.*yy.^5.*4.545223953790024e-1+xx.^9.*yy.^4.*3.373349362223411e+1-xx.^5.*yy.^9.*5.481785841428752-xx.^6.*yy.^8.*4.129058490033813e+1-xx.^7.*yy.^7.*1.994978298913851e+1-xx.^8.*yy.^6.*5.268976105202482-xx.^9.*yy.^5.*9.463935378555124-xx.^6.*yy.^9.*3.818431611067075e-1-xx.^7.*yy.^8.*3.411790228342504e+1+xx.^8.*yy.^7.*3.655275161975917e-1-xx.^9.*yy.^6.*3.422670732987394+xx.^7.*yy.^9.*6.935438665851035+xx.^8.*yy.^8.*1.650057442285759e+1+xx.^9.*yy.^7.*8.679731905869081+xx.^8.*yy.^9.*1.417469705276344e-2+xx.^9.*yy.^8.*1.111802135132597e+1-xx.^9.*yy.^9.*3.053749060430634-xx.*yy.*1.358041539872225-xx.*yy.^2.*1.761743113711948e+1+xx.^2.*yy.*3.007646166548722e-1+xx.*yy.^3.*2.987672996272836+xx.^3.*yy.*4.204788976746628+xx.*yy.^4.*3.4624013480431+xx.^4.*yy.*7.852805642778767e-1-xx.*yy.^5.*2.130815820353545-xx.^5.*yy.*5.532429583266559+xx.*yy.^6.*1.780044557350331-xx.^6.*yy.*1.026118629770241+xx.*yy.^7.*7.290080029920991e-1+xx.^7.*yy.*3.906556882879037+xx.*yy.^8.*1.336261799653921+xx.^8.*yy.*3.006291554277033e-1-xx.*yy.^9.*2.278236390391508e-1-xx.^9.*yy.*1.220870513639053-xx.^2.*1.548574693140216e+2-xx.^3.*1.720022808360341e+2+xx.^4.*4.900173107690596e+2+xx.^5.*3.710874862768505e+2-xx.^6.*5.599153171793714e+2-xx.^7.*2.703387290954101e+2+xx.^8.*2.136429561611328e+2+xx.^9.*6.021479908170309e+1-yy.^2.*2.217850749090318e+1+yy.^3.*8.032281878547765e-1+yy.^4.*1.147823900997428e+1-yy.^5.*5.259371043980779e-1-yy.^6.*8.669015228839822e-1+yy.^7.*8.425893861929189e-2+yy.^8.*4.546501004086849e-1-yy.^9.*9.955346991849411e-4+1.11125199034042e+1).*(xx.*8.917450828091442e-1-yy.*1.832764070999146e-3-xx.^2.*yy.^2.*3.149250096599649+xx.^2.*yy.^3.*3.432275747499679e-1+xx.^3.*yy.^2.*7.108205033182954e+1+xx.^2.*yy.^4.*3.910407900960859-xx.^3.*yy.^3.*1.007615333683764+xx.^4.*yy.^2.*7.301846550389142e+1-xx.^2.*yy.^5.*5.774881479713465e-1-xx.^3.*yy.^4.*1.040150888639639e+2-xx.^4.*yy.^3.*4.127436011116915-xx.^5.*yy.^2.*5.064993011991733e+2-xx.^2.*yy.^6.*1.840393391604457+xx.^3.*yy.^5.*1.597111669874699-xx.^4.*yy.^4.*9.955144214033603e+1+xx.^5.*yy.^3.*2.138303646817599-xx.^6.*yy.^2.*4.921591873960447e+2+xx.^2.*yy.^7.*5.225563086072636e-1+xx.^3.*yy.^6.*6.988888963931489e+1+xx.^4.*yy.^5.*7.079509787256945+xx.^5.*yy.^4.*7.302234063822373e+2+xx.^6.*yy.^3.*1.863040142690569e+1+xx.^7.*yy.^2.*1.76818389645896e+3+xx.^2.*yy.^8.*2.453279080016533e-1-xx.^3.*yy.^7.*1.163087952436314+xx.^4.*yy.^6.*5.915918234243827e+1-xx.^5.*yy.^5.*3.35018410738197+xx.^6.*yy.^4.*6.841086500842017e+2+xx.^7.*yy.^3.*1.252957342057255+xx.^8.*yy.^2.*1.480467010634292e+3-xx.^2.*yy.^9.*3.032655221718485e-1-xx.^3.*yy.^8.*2.278036773045523e+1-xx.^4.*yy.^7.*6.723071064431262-xx.^5.*yy.^6.*4.795297487798922e+2-xx.^6.*yy.^5.*3.326364713317154e+1-xx.^7.*yy.^4.*2.521032212095309e+3-xx.^8.*yy.^3.*4.653269694282666e+1-xx.^9.*yy.^2.*3.447954066931935e+3-xx.^2.*yy.^10.*1.673760709754303e-1+xx.^3.*yy.^9.*3.536004285541229e-1-xx.^4.*yy.^8.*1.647455285154051e+1+xx.^5.*yy.^7.*1.959490888593118-xx.^6.*yy.^6.*4.244258590721315e+2-xx.^7.*yy.^5.*1.851249760126308-xx.^8.*yy.^4.*2.060464579497394e+3-xx.^9.*yy.^3.*1.15097316035386e+1-xx.^10.*yy.^2.*2.38844937500287e+3+xx.^2.*yy.^11.*1.285283229959356e-1+xx.^3.*yy.^10.*5.985563635425356+xx.^4.*yy.^9.*4.224198125183847+xx.^5.*yy.^8.*1.530130293824737e+2+xx.^6.*yy.^7.*3.420937255464183e+1+xx.^7.*yy.^6.*1.628542058641167e+3+xx.^8.*yy.^5.*8.744487892771101e+1+xx.^9.*yy.^4.*4.871207293139532e+3+xx.^10.*yy.^3.*7.1312618419082e+1+xx.^11.*yy.^2.*3.949541181898515e+3+xx.^2.*yy.^12.*1.088122026806739e-1-xx.^3.*yy.^11.*2.535201427281161e-2+xx.^4.*yy.^10.*5.9004576328881+xx.^5.*yy.^9.*2.41233360867424e-1+xx.^6.*yy.^8.*1.299219303681419e+2+xx.^7.*yy.^7.*3.651593703534549+xx.^8.*yy.^6.*1.289366818512573e+3+xx.^9.*yy.^5.*1.728631843992101e+1+xx.^10.*yy.^4.*3.302797117233668e+3+xx.^11.*yy.^3.*1.883167226905925e+1+xx.^12.*yy.^2.*2.213047026124823e+3-xx.^2.*yy.^13.*3.515509262970026e-2-xx.^3.*yy.^12.*1.990127958180967-xx.^4.*yy.^11.*1.899800493738188-xx.^5.*yy.^10.*4.316621149718254e+1-xx.^6.*yy.^9.*2.381209633537286e+1-xx.^7.*yy.^8.*5.144972151621673e+2-xx.^8.*yy.^7.*9.767466929700799e+1-xx.^9.*yy.^6.*3.106243948572863e+3-xx.^10.*yy.^5.*1.41702297922157e+2-xx.^11.*yy.^4.*5.533605835398259e+3-xx.^12.*yy.^3.*6.786183956102263e+1-xx.^13.*yy.^2.*2.639229675258195e+3+xx.^2.*yy.^14.*7.731813451389398e-4+xx.^3.*yy.^13.*4.865422726462125e-3-xx.^4.*yy.^12.*2.445679991191839-xx.^5.*yy.^11.*6.715940725269066e-1-xx.^6.*yy.^10.*4.507673288076278e+1-xx.^7.*yy.^9.*5.603093601746989-xx.^8.*yy.^8.*4.109282146089062e+2-xx.^9.*yy.^7.*1.753996470905003e+1-xx.^10.*yy.^6.*2.05796865030684e+3-xx.^11.*yy.^5.*2.793033132389915e+1-xx.^12.*yy.^4.*3.023652971671623e+3-xx.^13.*yy.^3.*1.446278259530199e+1-xx.^14.*yy.^2.*1.175938086326686e+3+xx.^2.*yy.^15.*5.01490593227162e-3+xx.^3.*yy.^14.*1.226130225377401e-1+xx.^4.*yy.^13.*5.205137916111856e-1+xx.^5.*yy.^12.*1.508082715349343e+1+xx.^6.*yy.^11.*1.135783574844549e+1+xx.^7.*yy.^10.*1.550603977802377e+2+xx.^8.*yy.^9.*7.38498642874362e+1+xx.^9.*yy.^8.*9.780906748278276e+2+xx.^10.*yy.^7.*1.703675468456969e+2+xx.^11.*yy.^6.*3.48881762178512e+3+xx.^12.*yy.^5.*1.428822558885717e+2+xx.^13.*yy.^4.*3.667162483559571e+3+xx.^14.*yy.^3.*3.837413530633986e+1+xx.^15.*yy.^2.*9.503660390569385e+2+xx.^2.*yy.^16.*5.861221821537304e-3-xx.^3.*yy.^15.*2.037315527441673e-4+xx.^4.*yy.^14.*7.64869899364752e-2+xx.^5.*yy.^13.*1.907444769558822e-1+xx.^6.*yy.^12.*1.708589308022411e+1+xx.^7.*yy.^11.*4.065934064451773+xx.^8.*yy.^10.*1.491040426535532e+2+xx.^9.*yy.^9.*1.595803178073279e+1+xx.^10.*yy.^8.*6.744049813455803e+2+xx.^11.*yy.^7.*2.607330069477239e+1+xx.^12.*yy.^6.*1.859959336144574e+3+xx.^13.*yy.^5.*2.106027647564672e+1+xx.^14.*yy.^4.*1.578290455337145e+3+xx.^15.*yy.^3.*5.404759849680721+xx.^16.*yy.^2.*3.312168568189724e+2-xx.^2.*yy.^17.*1.209189583631184e-3-xx.^3.*yy.^16.*5.542030145778944e-2-xx.^4.*yy.^15.*7.890299096297505e-2-xx.^5.*yy.^14.*8.483322346337942e-1-xx.^6.*yy.^13.*3.107942149637959-xx.^7.*yy.^12.*5.564407009824581e+1-xx.^8.*yy.^11.*3.650661663212293e+1-xx.^9.*yy.^10.*3.135855585359998e+2-xx.^10.*yy.^9.*1.365638754511626e+2-xx.^11.*yy.^8.*1.099176627885069e+3-xx.^12.*yy.^7.*1.829398379551916e+2-xx.^13.*yy.^6.*2.286445876513336e+3-xx.^14.*yy.^5.*8.599320413293898e+1-xx.^15.*yy.^4.*1.308610165671812e+3-xx.^16.*yy.^3.*1.145401808951412e+1-xx.^17.*yy.^2.*1.419636251155902e+2+xx.^2.*yy.^18.*8.813655028507696e-7-xx.^3.*yy.^17.*1.594025887336131e-3-xx.^4.*yy.^16.*1.074352580846769e-1-xx.^5.*yy.^15.*3.328937208257363e-2-xx.^6.*yy.^14.*7.772215192279019e-1-xx.^7.*yy.^13.*1.176397856728984-xx.^8.*yy.^12.*5.503214239313669e+1-xx.^9.*yy.^11.*1.006936419795361e+1-xx.^10.*yy.^10.*2.635384382933626e+2-xx.^11.*yy.^9.*2.135812279225621e+1-xx.^12.*yy.^8.*6.248915151960172e+2-xx.^13.*yy.^7.*1.892072024283776e+1-xx.^14.*yy.^6.*9.501742999811358e+2-xx.^15.*yy.^5.*7.651190531025566-xx.^16.*yy.^4.*4.335602806008366e+2-xx.^17.*yy.^3.*7.754902865214392e-1-xx.^18.*yy.^2.*3.805352147351891e+1+xx.^3.*yy.^18.*1.055806479643397e-4+xx.^4.*yy.^17.*2.113472311575987e-2+xx.^5.*yy.^16.*4.859441895485767e-1+xx.^6.*yy.^15.*5.04519123868697e-1+xx.^7.*yy.^14.*2.975139612246843+xx.^8.*yy.^13.*9.972525025258876+xx.^9.*yy.^12.*1.14241908354265e+2+xx.^10.*yy.^11.*6.878430806750447e+1+xx.^11.*yy.^10.*3.740510789006829e+2+xx.^12.*yy.^9.*1.526436852440644e+2+xx.^13.*yy.^8.*7.22397895624235e+2+xx.^14.*yy.^7.*1.164418673445259e+2+xx.^15.*yy.^6.*8.059991480707276e+2+xx.^16.*yy.^5.*2.767809505586303e+1+xx.^17.*yy.^4.*1.933951468944043e+2+xx.^18.*yy.^3.*1.308041198296645+xx.^4.*yy.^18.*1.053414956120493e-4+xx.^5.*yy.^17.*2.064844552181837e-2+xx.^6.*yy.^16.*7.311122078559425e-1+xx.^7.*yy.^15.*2.068006677205367e-1+xx.^8.*yy.^14.*2.929492444862385+xx.^9.*yy.^13.*2.988342727601186+xx.^10.*yy.^12.*9.644324674983939e+1+xx.^11.*yy.^11.*1.305508809759776e+1+xx.^12.*yy.^10.*2.681367496312035e+2+xx.^13.*yy.^9.*1.503082047430628e+1+xx.^14.*yy.^8.*3.278088783118031e+2+xx.^15.*yy.^7.*6.634680801390892+xx.^16.*yy.^6.*2.526711036194698e+2+xx.^17.*yy.^5.*1.045007940823613+xx.^18.*yy.^4.*4.812290504794675e+1-xx.^5.*yy.^18.*1.50178494658072e-3-xx.^6.*yy.^17.*1.444998993096548e-1-xx.^7.*yy.^16.*2.012430010644059-xx.^8.*yy.^15.*1.736908330974427-xx.^9.*yy.^14.*5.995675469831725-xx.^10.*yy.^13.*1.880438280990048e+1-xx.^11.*yy.^12.*1.374982347789386e+2-xx.^12.*yy.^11.*7.754411397871978e+1-xx.^13.*yy.^10.*2.610329616357622e+2-xx.^14.*yy.^9.*9.995500470504359e+1-xx.^15.*yy.^8.*2.556878311939802e+2-xx.^16.*yy.^7.*3.961883526311578e+1-xx.^17.*yy.^6.*1.173608324930028e+2-xx.^18.*yy.^5.*3.536053671430259-xx.^6.*yy.^18.*9.220149238483281e-4-xx.^7.*yy.^17.*1.014690476686303e-1-xx.^8.*yy.^16.*2.473189356253753-xx.^9.*yy.^15.*5.594697728012737e-1-xx.^10.*yy.^14.*5.664508747841497-xx.^11.*yy.^13.*3.965075348636596-xx.^12.*yy.^12.*9.783286253951298e+1-xx.^13.*yy.^11.*9.179583293626597-xx.^14.*yy.^10.*1.573007989970698e+2-xx.^15.*yy.^9.*5.235877836375165-xx.^16.*yy.^8.*9.009099148888656e+1-xx.^17.*yy.^7.*8.544704478967668e-1-xx.^18.*yy.^6.*2.674768472208937e+1+xx.^7.*yy.^18.*8.789660503979215e-3+xx.^8.*yy.^17.*5.154726443207739e-1+xx.^9.*yy.^16.*4.575501924068617+xx.^10.*yy.^15.*3.519392032862595+xx.^11.*yy.^14.*7.244553726468354+xx.^12.*yy.^13.*2.129145940801576e+1+xx.^13.*yy.^12.*9.652573649437794e+1+xx.^14.*yy.^11.*5.089115632054402e+1+xx.^15.*yy.^10.*9.845644712361996e+1+xx.^16.*yy.^9.*3.474525767319002e+1+xx.^17.*yy.^8.*3.73992298363824e+1+xx.^18.*yy.^7.*5.405894441477231+xx.^8.*yy.^18.*2.917787272284469e-3+xx.^9.*yy.^17.*2.572393452106676e-1+xx.^10.*yy.^16.*4.733102430610986+xx.^11.*yy.^15.*8.181721343591682e-1+xx.^12.*yy.^14.*6.193203199800339+xx.^13.*yy.^13.*2.853719379455096+xx.^14.*yy.^12.*5.718940055267839e+1+xx.^15.*yy.^11.*3.241086639512342+xx.^16.*yy.^10.*4.931962357420912e+1+xx.^17.*yy.^9.*6.747402570722794e-1+xx.^18.*yy.^8.*1.000453477214209e+1-xx.^9.*yy.^18.*2.770194324088346e-2-xx.^10.*yy.^17.*1.060768626920755-xx.^11.*yy.^16.*6.063659935013136-xx.^12.*yy.^15.*4.298729062320957-xx.^13.*yy.^14.*5.188023946675464-xx.^14.*yy.^13.*1.408951687993052e+1-xx.^15.*yy.^12.*3.658477349173497e+1-xx.^16.*yy.^11.*1.763694828691533e+1-xx.^17.*yy.^10.*1.546810666592484e+1-xx.^18.*yy.^9.*4.825340323808244-xx.^10.*yy.^18.*4.375685387384132e-3-xx.^11.*yy.^17.*3.713267341545781e-1-xx.^12.*yy.^16.*5.390084222106306-xx.^13.*yy.^15.*6.738582988011823e-1-xx.^14.*yy.^14.*3.859376170867516-xx.^15.*yy.^13.*1.037177872154021-xx.^16.*yy.^12.*1.775828191771638e+1-xx.^17.*yy.^11.*4.29668961753619e-1-xx.^18.*yy.^10.*6.377690249692412+xx.^11.*yy.^18.*5.061696088482958e-2+xx.^12.*yy.^17.*1.300627194368403+xx.^13.*yy.^16.*4.682344463791613+xx.^14.*yy.^15.*3.094039065852764+xx.^15.*yy.^14.*2.03153119138446+xx.^16.*yy.^13.*4.946110325242825+xx.^17.*yy.^12.*5.777902331673031+xx.^18.*yy.^11.*2.424963328716446+xx.^12.*yy.^18.*3.183114231013491e-3+xx.^13.*yy.^17.*3.092145947884248e-1+xx.^14.*yy.^16.*3.629527888134607+xx.^15.*yy.^15.*2.949491814312678e-1+xx.^16.*yy.^14.*1.2714196413809+xx.^17.*yy.^13.*1.440966441698496e-1+xx.^18.*yy.^12.*2.241647785000835-xx.^13.*yy.^18.*5.349374321560299e-2-xx.^14.*yy.^17.*9.33783004746455e-1-xx.^15.*yy.^16.*1.957315224018444-xx.^16.*yy.^15.*1.199954149395863-xx.^17.*yy.^14.*3.355010021173755e-1-xx.^18.*yy.^13.*6.934728168026845e-1-xx.^14.*yy.^18.*9.373212372286827e-4-xx.^15.*yy.^17.*1.387400101197578e-1-xx.^16.*yy.^16.*1.336780615484007-xx.^17.*yy.^15.*5.351190538689366e-2-xx.^18.*yy.^14.*1.702723527279216e-1+xx.^15.*yy.^18.*3.026462613229377e-2+xx.^16.*yy.^17.*3.601327004082595e-1+xx.^17.*yy.^16.*3.430316844923598e-1+xx.^18.*yy.^15.*1.915157980525296e-1+xx.^16.*yy.^18.*2.672769955889301e-5+xx.^17.*yy.^17.*2.60341252165812e-2+xx.^18.*yy.^16.*2.078858690727986e-1-xx.^17.*yy.^18.*7.079740141201421e-3-xx.^18.*yy.^17.*5.710577672108429e-2+xx.^18.*yy.^18.*1.167810588291038e-6-xx.*yy.*3.075366976262442e-2-xx.*yy.^2.*3.526499241348434-xx.^2.*yy.*8.22091599289123e-2+xx.*yy.^3.*1.279267114308256e-1+xx.^3.*yy.*2.422755366776858e-1+xx.*yy.^4.*5.274972053599984+xx.^4.*yy.*9.838541330816038e-1-xx.*yy.^5.*2.057588038303203e-1-xx.^5.*yy.*4.953532667643909e-1-xx.*yy.^6.*3.667311777247011-xx.^6.*yy.*4.373943336369689+xx.*yy.^7.*1.591772639121506e-1-xx.^7.*yy.*4.450755114932008e-1+xx.*yy.^8.*1.241212300797983+xx.^8.*yy.*1.066815031820515e+1-xx.*yy.^9.*6.133207109844262e-2+xx.^9.*yy.*3.188597989877851-xx.*yy.^10.*3.006491051813672e-1-xx.^10.*yy.*1.585254055500515e+1+xx.*yy.^11.*1.34537384760043e-2-xx.^11.*yy.*5.153376996842015+xx.*yy.^12.*9.083199337053412e-2+xx.^12.*yy.*1.452649282223464e+1-xx.*yy.^13.*3.117573298460605e-3+xx.^13.*yy.*3.98291350637101-xx.*yy.^14.*6.304899409665063e-3-xx.^14.*yy.*7.82968931460302+xx.*yy.^15.*4.110970690634906e-4-xx.^15.*yy.*1.512490222340712+xx.*yy.^16.*2.003209230634498e-3+xx.^16.*yy.*2.180160034236967-xx.*yy.^17.*6.692898196101731e-6+xx.^17.*yy.*2.232626342763958e-1+xx.*yy.^18.*3.833781977872521e-7-xx.^18.*yy.*2.184421777805796e-1+xx.^2.*8.858362630041713e-1-xx.^3.*1.82382173556976e+1-xx.^4.*1.957558756949681e+1+xx.^5.*1.312418883880755e+2+xx.^6.*1.305923371426672e+2-xx.^7.*4.615843547867497e+2-xx.^8.*3.929721561768615e+2+xx.^9.*9.056915732081774e+2+xx.^10.*6.372469002766035e+2-xx.^11.*1.043360695274391e+3-xx.^12.*5.955720645853718e+2+xx.^13.*7.011815709552087e+2+xx.^14.*3.203552367072348e+2-xx.^15.*2.540433444872568e+2-xx.^16.*9.173269575880823e+1+xx.^17.*3.82198342698243e+1+xx.^18.*1.077219415605556e+1+yy.^2.*6.121374088507809e-5+yy.^3.*7.566679105625542e-3-yy.^4.*2.616937320847826e-4-yy.^5.*1.204865172584651e-2+yy.^6.*4.468547430148061e-4+yy.^7.*9.176084750846805e-3-yy.^8.*3.785602968701871e-4-yy.^9.*3.422992169154646e-3+yy.^10.*1.62999960348087e-4+yy.^11.*6.876030356471064e-4-yy.^12.*3.352881389468098e-5-yy.^13.*1.388009800634545e-4+yy.^14.*3.333314996184432e-6+yy.^15.*1.360695926359456e-5-yy.^16.*1.655644414705918e-7-yy.^17.*7.64905319289316e-7+yy.^18.*1.674878549087182e-9-4.550268315834584e-7).^2.*(-8.845979223770551e-5));
integral2(g,-1,1,-1,1) integration MATLAB Answers — New Questions
Optimizing a matrix of values
Hi, I need help in optimizing a matrix of values. Assuming a 3×3 matrix, I would have this matrix:
I needed the values of A to F be optimized. What I would usually do is to just take [A B C D E F] as an input value and call it a day. To be fair, this works decently.
My main issue is that my matrix usually changes size, ie. it becomes this:
I will have to change the input to [A B] this time. My question, is, is there a more elegant way of doing these things: Is there a way for me to simply plug in the two matrices without reshaping them and forcing 0 on the diagonal?Hi, I need help in optimizing a matrix of values. Assuming a 3×3 matrix, I would have this matrix:
I needed the values of A to F be optimized. What I would usually do is to just take [A B C D E F] as an input value and call it a day. To be fair, this works decently.
My main issue is that my matrix usually changes size, ie. it becomes this:
I will have to change the input to [A B] this time. My question, is, is there a more elegant way of doing these things: Is there a way for me to simply plug in the two matrices without reshaping them and forcing 0 on the diagonal? Hi, I need help in optimizing a matrix of values. Assuming a 3×3 matrix, I would have this matrix:
I needed the values of A to F be optimized. What I would usually do is to just take [A B C D E F] as an input value and call it a day. To be fair, this works decently.
My main issue is that my matrix usually changes size, ie. it becomes this:
I will have to change the input to [A B] this time. My question, is, is there a more elegant way of doing these things: Is there a way for me to simply plug in the two matrices without reshaping them and forcing 0 on the diagonal? matrix manipulation MATLAB Answers — New Questions
Can Matlab Home run on a Persistent Live Ubuntu USB Stick Operating System?
I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help.I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help. I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help. usb matlab, live usb MATLAB Answers — New Questions
Can Matlab Home run on a Persistent Live Ubuntu USB Stick Operating System?
I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help.I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help. I anticipate moving from my MS Windows 10 OS to a Ubuntu LTS OS. In preparation for that, I am evaluating several software packages on a "Persistent Live Ubuntu LTS USB Stick Operating System". I have a Matlab Home license on my Windows 10 OS. Can I install and run my Home license on the Ubuntu USB OS?
Once I get all of the apps I need running on the Ubuntu USB OS, I will then replace the Windows 10 OS with the Ubuntu OS. I am using the same HP ZBook for both OSs. (Not at the same time, obviously.) When Microsoft stops supporting Windows 10, I will make the change. My current ZBook will not support Windows 11.
Thanks in advance for your experience and your help. usb matlab, live usb MATLAB Answers — New Questions
Indexing data on a grid
I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks.I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. indexing MATLAB Answers — New Questions
Indexing data on a grid
I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks.I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. indexing MATLAB Answers — New Questions
I need to synchronise live camera and lidar how can i do it
Working on sensor fusion project for autonomous vehicles but I cannot synchronise the data between the lidar and cameraWorking on sensor fusion project for autonomous vehicles but I cannot synchronise the data between the lidar and camera Working on sensor fusion project for autonomous vehicles but I cannot synchronise the data between the lidar and camera sensor fusion, lidar, camera MATLAB Answers — New Questions
i have some trouble to create function for Ea approximate error….
hi this is bisection method how do i include approximate error in the table
format short
clear all
clc
u = 2510;
M = 2.8*10^6;
m = 13.3*10^3;
g = 9.81;
v = 335;
n = 4;
t = 0:2:100;
f = @(t) u*log(M./(M-m*t)) – g*t – v;
a = 70;
b = 72;
epsilon = 5*10^(-n-1);
itermax = 20;
x0 = (a+b)/2;
err = abs(f(x0));
iter = 1;
Variables = {‘Iter’, ‘a’, ‘b’, ‘x0’, ‘f_x0’, ‘Error’ , };
HG = [iter a b x0 f(x0) err ];
if f(a)*f(b)>0
disp(‘wrong choice of a and b’);
else
while (iter<=itermax && err>= epsilon)
if f(a)*f(x0)<0
b=x0;
else
a=x0;
end
x0 = (a+b)/2;
err = abs(f(x0));
HG = [HG;iter a b x0 f(x0) err ];
iter = iter+1;
end
end
disp(‘ Itr. No a b x0 f(x0) error’);
disp(HG);hi this is bisection method how do i include approximate error in the table
format short
clear all
clc
u = 2510;
M = 2.8*10^6;
m = 13.3*10^3;
g = 9.81;
v = 335;
n = 4;
t = 0:2:100;
f = @(t) u*log(M./(M-m*t)) – g*t – v;
a = 70;
b = 72;
epsilon = 5*10^(-n-1);
itermax = 20;
x0 = (a+b)/2;
err = abs(f(x0));
iter = 1;
Variables = {‘Iter’, ‘a’, ‘b’, ‘x0’, ‘f_x0’, ‘Error’ , };
HG = [iter a b x0 f(x0) err ];
if f(a)*f(b)>0
disp(‘wrong choice of a and b’);
else
while (iter<=itermax && err>= epsilon)
if f(a)*f(x0)<0
b=x0;
else
a=x0;
end
x0 = (a+b)/2;
err = abs(f(x0));
HG = [HG;iter a b x0 f(x0) err ];
iter = iter+1;
end
end
disp(‘ Itr. No a b x0 f(x0) error’);
disp(HG); hi this is bisection method how do i include approximate error in the table
format short
clear all
clc
u = 2510;
M = 2.8*10^6;
m = 13.3*10^3;
g = 9.81;
v = 335;
n = 4;
t = 0:2:100;
f = @(t) u*log(M./(M-m*t)) – g*t – v;
a = 70;
b = 72;
epsilon = 5*10^(-n-1);
itermax = 20;
x0 = (a+b)/2;
err = abs(f(x0));
iter = 1;
Variables = {‘Iter’, ‘a’, ‘b’, ‘x0’, ‘f_x0’, ‘Error’ , };
HG = [iter a b x0 f(x0) err ];
if f(a)*f(b)>0
disp(‘wrong choice of a and b’);
else
while (iter<=itermax && err>= epsilon)
if f(a)*f(x0)<0
b=x0;
else
a=x0;
end
x0 = (a+b)/2;
err = abs(f(x0));
HG = [HG;iter a b x0 f(x0) err ];
iter = iter+1;
end
end
disp(‘ Itr. No a b x0 f(x0) error’);
disp(HG); bisection MATLAB Answers — New Questions