In Matlab, I am trying to figure out how to find and use a acetylene.mat to perform an analysis. In the analysis, I must define independent and dependent variables, create a plot with each dependent variable with each independent variable, given each independent variable and calculate the mean, standard deviation, median, and range of each dependent variable. Finally, I need to give each independent variable plot a boxplot of each dependent variable.
Please find required MATLAB code along with necessary details in comments:
clear all; close all; clc
format short
% acetleyne.mat is an inbuit dataset in MATLAB
load acetylene.mat
data=[x1 x2 x3];
disp('Covariance matrix of the data is given as:')
disp(cov(data));
% Since it is evident that the covariance of x1 and x2 with x3 is very small. So, x3 is assumed to be independednt
% wrt to x1 and x2
% Plots for each dependent variables
subplot(2,1,1)
plot(x1,x2,'r*-');
xlabel('x1'), ylabel('x2');
subplot(2,1,2)
plot(x1,x3,'bo-');
xlabel('x1'), ylabel('x3');
suptitle('For dependent variable wrt to x_1');
% ----------------
figure
subplot(2,1,1)
plot(x2,x3,'r*-');
xlabel('x2'), ylabel('x3');
subplot(2,1,2)
plot(x2,x1,'bo-');
xlabel('x2'), ylabel('x1');
suptitle('For dependent variable wrt to x_2');
% ----------------
figure;
subplot(2,1,1)
plot(x3,x1,'r*-');
xlabel('x3'), ylabel('x1');
subplot(2,1,2)
plot(x3,x2,'bo-');
xlabel('x3'), ylabel('x2');
suptitle('For dependent variable wrt to x_3');
% --------------------------
% calculate mean of each variable
mean_x1=mean(x1)
mean_x2=mean(x2)
mean_x3=mean(x3)
mean_y=mean(y)
% calculate standard deviation of each variable
std_x1=std(x1)
std_x2=std(x2)
std_x3=std(x3)
std_y=std(y)
% calculate meadian of each variable
meadian_x1=median(x1)
meadian_x2=median(x2)
meadian_x3=median(x3)
meadian_y=median(y)
% calculate range of each variable
range_x1=range(x1)
range_x2=range(x2)
range_x3=range(x3)
range_y=range(y)
% draw boxplot for each variable
figure;
subplot(2,2,1)
boxplot(x1);
ylabel('Reactor temperature (degrees centigrade)');
subplot(2,2,2)
boxplot(x2);
ylabel('Rate of H2 to n-heptane (mole ratio)');
subplot(2,2,3)
boxplot(x3);
ylabel('Contact time (seconds)');
subplot(2,2,4)
boxplot(y);
ylabel('Conversion of n-heptane to acetylene (%)');
====================== SCREENSHOT OF CODE
======================= SAMPLE OUTPUT
In Matlab, I am trying to figure out how to find and use a acetylene.mat to...
MONTE CARLO SIMULATION: So I am trying to figure out a MATLAB code to generate a Monte Carlo simulation for my mean and standard deviation values. I have a material (fat) with mean and standard deviation values as well as mean and standard deviation values for its thickness. I need to figure out a code that will plot and generate a monte carlo simulation. Any help would be greatly appreciated. Thanks
I am using a 2016 version of Matlab. I cannot figure out part a of this problem. 8. Define the variables x = 0.85, y = 12.5, and then use them to create a row vector that has the following elements: y.y*,In(e)x y.and x + y a) By using the vector indexing take the 2nd element of the vector and add it to 3rd ,ln(-),x * y,and x + y element assign it to variable Exampl1
For expert using R , I solve it but i need to figure out what I got is correct or wrong. Thank you # Simple Linear Regression and Polynomial Regression # HW 2 # # Read data from csv file data <- read.csv("C:\data\SweetPotatoFirmness.csv",header=TRUE, sep=",") head(data) str(data) # scatterplot of independent and dependent variables plot(data$pectin,data$firmness,xlab="Pectin, %",ylab="Firmness") par(mfrow = c(2, 2)) # Split the plotting panel into a 2 x 2 grid model <- lm(firmness ~ pectin , data=data) summary(model) anova(model) plot(model)...
I am am trying to figure out how to get from the starting benzene ring using friedel-crafts acylation and getting a double bond on the end, or a halide on the end. The halide can easily be turned into the double bond. We were unable to transcribe this imageCHM all
This is a IR spectrum, I am trying to figure out if I am doing this right?Base on this graph I think I have alcohol for my unknown substance. 3500 3295 13 3148 77 3000 (Nonpolar) Cec sharp Medium 2501 1012 0=1 1709 SOCELL OOT 1506 457 43 1356 00 1148 29 1046 95 100553 1000 873 34 500
Hi! I am struggling trying to figure out how to do this. For this lab, you must have two implementations of calculating the Fibonacci sequence. You are required to calculate it utilizing an array and then with a pointer. You must use the array provided and you must malloc space for your pointer. Your algorithms must be in-place, meaning they do not use a temporary variable to calculate the next sequence number. Lastly, you must insert a comment above each...
Hi, I am trying to figure out how write a code to read in a list of integers separated by commas into an array in c++, while ignoring the commas. example input 5, 2, 8, 6, 3, 6, 9, 7 example array: int arr[] = {5,2,8,6,3,6,9,7};
I just need one question. I am just trying to figure out what to do for this set. Write chemical formulas for the acids that produce each of the following ions. c _2 O_4^2- PO_3^3- Br^- S^2- H _2 PO_4^-
using matlab Perform the following using Matlab For an additive Gaussian noise: a. Generate 4000 samples with mean value of 3 and variance of 9. b. Plot the sample values using two different ways. c. Determine the actual mean, variance, and standard deviation. d. Determine the median, mode, and range. e. Sketch the histogram. tle- enerate and plot the probability density function (pdf) and its corresponding cumulative distribution function (cdf) ror he M For the following two signals: / and...
(0.110g*100%)/2.224g I am trying to figure out how many significant figures the final answer 4.946% should use. An explanation would be great.