This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!
Become a Premium Member and unlock a new, free course in leading technologies each month.
Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17
x373
Solutions
442
Contributors
MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.
Sign up to Post
Load Recent Content
clear all;
clc;
syms x y
y = -x;
z=int(y,x);
v=[0:0.1/19:0.1];
dr=0.1/20;
for i=1:20
x=v(i);
kk(i)=eval(y)*(dr);
end
R1=sum(kk(1,:));
x=0.1;
z1=eval(z);
x=0;
z2=eval(z);
R2=z2-z1;
This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!
#include <fftw3.h>
using namespace std;
double** create2DArray(int row, int col)
{
double** arr = new double*[row];
for(int i = 0; i < row; i++)
arr[i] = new double[col];
return arr;
}
int main()
{
int m = 3;
int n = 3;
/*double a[m][n] =
{
{0.2, 0.3 ,1},
{0 ,12 ,5},
{0.3, 0.3, 1}
};*/
double** a= create2DArray(m,n);
for( int j = 0; j < m;j++ )
{
for(int i = 0; i < n; i++)
{
a[i][j] = Signal[i]*hamming[i];
}
}
double** b= create2DArray(m,n);
printf("Original vector\n");
for(int i=0;i<m;i++)
{
for(int j = 0 ;j<n;j++)
{
cout << a[i][j] <<" " ;
}
cout<< endl;
}
fftw_plan plan = fftw_plan_r2r_2d(n, m,&a[0][0],&b[0][0], FFTW_REDFT10, FFTW_REDFT10, FFTW_ESTIMATE);
fftw_execute(plan);
printf("DCT\n");
for(int i=0;i<m;i++)
{
for(int j = 0 ;j<n;j++)
{
cout << b[i][j] <<" " ;
}
cout<< endl;
}
fftw_plan plani = fftw_plan_r2r_2d(n, m,&b[0][0],&a[0][0], FFTW_REDFT01, FFTW_REDFT01,FFTW_MEASURE);
fftw_execute(plani);
printf("IDCT\n");
for(int i=0;i<m;i++)
{
for(int j = 0 ;j<n;j++)
{
cout << a[i][j]/(m*n*4) <<" " ;
}
cout<< endl;
}
return 0;
x = [600, 800, 1000, 1200, 1400];
y = [0, 02, 04, 0.7, 1];
f = @(p,x) (p(3)-p(4))./(1+exp(-(x-p(2))/p(1)))+p(4);
opts = optimset('Display','off','MaxFunEvals',1000);
sigfit = lsqcurvefit(f, starting_value, intervals,problong,[],[],opts);
bisection_point= sigfit(2)-sigfit(1)*log((sigfit(3)-0.5)/(0.5-sigfit(4)))
function Result = z(x, y)
Result=-x*y;
Given that function I want to solve this ODE. (the RHS comes from that function)>> dsolve('Dy=-x*y','y(0)=2','x')
ans =
2*exp(-x^2/2)
However I don't want to update the second bit of code every time the first changes. I was wondering if there's a way for the result to be automatically updated.
>> dsolve('Dy=-x*y','y(0)=2','x')
ans =
2*exp(-x^2/2)
I would like to evaluate this result numerically eg typing f(2) and the previous result (2*exp(-x^2/2)) would evaluated at 2 giving 0.2707function y = f(x)
y=2*exp(-x^2/2);
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
clc, clear
x = [0:20];
y = 0.0039*x.^3 + 0.78*x.^2 + 39.9*x - 467;
yp = 0.0117*x.^2 - 1.56*x +39.9;
plot(x,y)
[x_guess,y_guess] = ginput(1)
xi(1) = x_guess;
i=1;
err = 1;
while (err > .0001)
i=i+1; %increment
y = 0.0039*xi(i-1).^3 + 0.78*xi(i-1).^2 + 39.9*xi(i-1) - 467;
yp = 0.0117*xi(i-1).^2 - 1.56*xi(i-1) +39.9;
xi(i) = xi(i-1) - (y/yp);
err(i) = abs((xi(i)-xi(i-1))/xi(i)); %BROKEN HERE
end
xi
plot(1:i,err)
%its sorta working but not its not getting out of that while loop
% GOAL : find the X value where error is less than .0001
373
Solutions
442
Contributors
MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.