Tag Archives: matlab
Population Growth Model Development
Research in cell and tissue engineering often involves growing cells in the lab in a dish. Imagine
having a single 120 cm2 dish that has been seeded with 1500 cells/cm2. The dish can only
sustain 9×107 cells. With this seeding of the dish, the maximum that the dish can sustain
(carrying capacity) is reached in about 20-25 days. The growth rate, r, of this cell type is known
to be 0.75 cells per day (𝑏𝑖𝑟𝑡ℎ 𝑟𝑎𝑡𝑒 ― 𝑑𝑒𝑎𝑡ℎ 𝑟𝑎𝑡𝑒).
This cell population follows a logistic population growth model:
𝑑𝑃(𝑡)
𝑑𝑡 = 𝑟𝑃(𝑡)(1 ― 𝑃(𝑡)/𝐾 ),
where P(t) is the size of the population at time, t, K is a constant corresponding to the
saturation level (carrying capacity) and r > 0 is the birth rate.
1. Write a MATLAB script for the numerical solution of this cell population problem
utilizing the Euler differential equation solver as demonstrated in class.Research in cell and tissue engineering often involves growing cells in the lab in a dish. Imagine
having a single 120 cm2 dish that has been seeded with 1500 cells/cm2. The dish can only
sustain 9×107 cells. With this seeding of the dish, the maximum that the dish can sustain
(carrying capacity) is reached in about 20-25 days. The growth rate, r, of this cell type is known
to be 0.75 cells per day (𝑏𝑖𝑟𝑡ℎ 𝑟𝑎𝑡𝑒 ― 𝑑𝑒𝑎𝑡ℎ 𝑟𝑎𝑡𝑒).
This cell population follows a logistic population growth model:
𝑑𝑃(𝑡)
𝑑𝑡 = 𝑟𝑃(𝑡)(1 ― 𝑃(𝑡)/𝐾 ),
where P(t) is the size of the population at time, t, K is a constant corresponding to the
saturation level (carrying capacity) and r > 0 is the birth rate.
1. Write a MATLAB script for the numerical solution of this cell population problem
utilizing the Euler differential equation solver as demonstrated in class. Research in cell and tissue engineering often involves growing cells in the lab in a dish. Imagine
having a single 120 cm2 dish that has been seeded with 1500 cells/cm2. The dish can only
sustain 9×107 cells. With this seeding of the dish, the maximum that the dish can sustain
(carrying capacity) is reached in about 20-25 days. The growth rate, r, of this cell type is known
to be 0.75 cells per day (𝑏𝑖𝑟𝑡ℎ 𝑟𝑎𝑡𝑒 ― 𝑑𝑒𝑎𝑡ℎ 𝑟𝑎𝑡𝑒).
This cell population follows a logistic population growth model:
𝑑𝑃(𝑡)
𝑑𝑡 = 𝑟𝑃(𝑡)(1 ― 𝑃(𝑡)/𝐾 ),
where P(t) is the size of the population at time, t, K is a constant corresponding to the
saturation level (carrying capacity) and r > 0 is the birth rate.
1. Write a MATLAB script for the numerical solution of this cell population problem
utilizing the Euler differential equation solver as demonstrated in class. matlab MATLAB Answers — New Questions
trainYOLOv4ObjectDetector>iParseInputsYOLOv4 The class names specified in the detector must match the class names in training data.
Hi.When I try to train a YOLOv4,he said that Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
But I checked the content of the label and it’s the same as the detector.And I didn’t have this problem when training FasterrCNN.Here is my code:
load(‘training_data.mat’)
>> trainingData = objectDetectorTrainingData(gTruth);
% Create a partition of the data into a 70/30 train/test split
cvp = cvpartition(size(trainingData, 1), ‘HoldOut’, 0.2);
% Get the indices of the training and testing sets
trainIdx = cvp.training;
testIdx = cvp.test;
% Extract the training and testing data using the indices
trainData = trainingData(trainIdx, :);
testData = trainingData(testIdx, :);
imdsTrain = imageDatastore(trainData.imageFilename);
imdsTest = imageDatastore(testData.imageFilename);
bldsTrain = boxLabelDatastore(trainData(:, 2:end));
bldsTest = boxLabelDatastore(testData(:, 2:end));
%imdsValidationData = imageDatastore(validationData.imageFilename);
%bldsValidationData = boxLabelDatastore(validationData(:, 2:end));
ds = combine(imdsTrain,bldsTrain);
inputSize = [2880 2880 3];
trainingDataForEstimation = transform(ds,@(data)preprocessData(data,inputSize));
numAnchors = 6;
[anchors, meanIoU] = estimateAnchorBoxes(trainingDataForEstimation,numAnchors);
area = anchors(:,1).*anchors(:,2);
[~,idx] = sort(area,"descend");
anchors = anchors(idx,:);
anchorBoxes = {anchors(1:3,:);anchors(4:6,:)};
classes =gTruth.LabelDefinitions.Name’;
detector = yolov4ObjectDetector("tiny-yolov4-coco",classes,anchorBoxes,InputSize=inputSize);
options = trainingOptions("sgdm", …
InitialLearnRate=0.001, …
MiniBatchSize=16,…
MaxEpochs=40, …
BatchNormalizationStatistics="moving",…
ResetInputNormalization=false,…
VerboseFrequency=30);
trainedDetector = trainYOLOv4ObjectDetector(ds,detector,options);
Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
Error in trainYOLOv4ObjectDetector (line 119)
[trainingData, params] = iParseInputsYOLOv4(trainingData,detector,options,mfilename,varargin{:});
detector.ClassNames
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ }
gTruth.LabelDefinitions.Name
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ }Hi.When I try to train a YOLOv4,he said that Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
But I checked the content of the label and it’s the same as the detector.And I didn’t have this problem when training FasterrCNN.Here is my code:
load(‘training_data.mat’)
>> trainingData = objectDetectorTrainingData(gTruth);
% Create a partition of the data into a 70/30 train/test split
cvp = cvpartition(size(trainingData, 1), ‘HoldOut’, 0.2);
% Get the indices of the training and testing sets
trainIdx = cvp.training;
testIdx = cvp.test;
% Extract the training and testing data using the indices
trainData = trainingData(trainIdx, :);
testData = trainingData(testIdx, :);
imdsTrain = imageDatastore(trainData.imageFilename);
imdsTest = imageDatastore(testData.imageFilename);
bldsTrain = boxLabelDatastore(trainData(:, 2:end));
bldsTest = boxLabelDatastore(testData(:, 2:end));
%imdsValidationData = imageDatastore(validationData.imageFilename);
%bldsValidationData = boxLabelDatastore(validationData(:, 2:end));
ds = combine(imdsTrain,bldsTrain);
inputSize = [2880 2880 3];
trainingDataForEstimation = transform(ds,@(data)preprocessData(data,inputSize));
numAnchors = 6;
[anchors, meanIoU] = estimateAnchorBoxes(trainingDataForEstimation,numAnchors);
area = anchors(:,1).*anchors(:,2);
[~,idx] = sort(area,"descend");
anchors = anchors(idx,:);
anchorBoxes = {anchors(1:3,:);anchors(4:6,:)};
classes =gTruth.LabelDefinitions.Name’;
detector = yolov4ObjectDetector("tiny-yolov4-coco",classes,anchorBoxes,InputSize=inputSize);
options = trainingOptions("sgdm", …
InitialLearnRate=0.001, …
MiniBatchSize=16,…
MaxEpochs=40, …
BatchNormalizationStatistics="moving",…
ResetInputNormalization=false,…
VerboseFrequency=30);
trainedDetector = trainYOLOv4ObjectDetector(ds,detector,options);
Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
Error in trainYOLOv4ObjectDetector (line 119)
[trainingData, params] = iParseInputsYOLOv4(trainingData,detector,options,mfilename,varargin{:});
detector.ClassNames
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ }
gTruth.LabelDefinitions.Name
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ } Hi.When I try to train a YOLOv4,he said that Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
But I checked the content of the label and it’s the same as the detector.And I didn’t have this problem when training FasterrCNN.Here is my code:
load(‘training_data.mat’)
>> trainingData = objectDetectorTrainingData(gTruth);
% Create a partition of the data into a 70/30 train/test split
cvp = cvpartition(size(trainingData, 1), ‘HoldOut’, 0.2);
% Get the indices of the training and testing sets
trainIdx = cvp.training;
testIdx = cvp.test;
% Extract the training and testing data using the indices
trainData = trainingData(trainIdx, :);
testData = trainingData(testIdx, :);
imdsTrain = imageDatastore(trainData.imageFilename);
imdsTest = imageDatastore(testData.imageFilename);
bldsTrain = boxLabelDatastore(trainData(:, 2:end));
bldsTest = boxLabelDatastore(testData(:, 2:end));
%imdsValidationData = imageDatastore(validationData.imageFilename);
%bldsValidationData = boxLabelDatastore(validationData(:, 2:end));
ds = combine(imdsTrain,bldsTrain);
inputSize = [2880 2880 3];
trainingDataForEstimation = transform(ds,@(data)preprocessData(data,inputSize));
numAnchors = 6;
[anchors, meanIoU] = estimateAnchorBoxes(trainingDataForEstimation,numAnchors);
area = anchors(:,1).*anchors(:,2);
[~,idx] = sort(area,"descend");
anchors = anchors(idx,:);
anchorBoxes = {anchors(1:3,:);anchors(4:6,:)};
classes =gTruth.LabelDefinitions.Name’;
detector = yolov4ObjectDetector("tiny-yolov4-coco",classes,anchorBoxes,InputSize=inputSize);
options = trainingOptions("sgdm", …
InitialLearnRate=0.001, …
MiniBatchSize=16,…
MaxEpochs=40, …
BatchNormalizationStatistics="moving",…
ResetInputNormalization=false,…
VerboseFrequency=30);
trainedDetector = trainYOLOv4ObjectDetector(ds,detector,options);
Error using trainYOLOv4ObjectDetector>iParseInputsYOLOv4
The class names specified in the detector must match the class names in training data.
Error in trainYOLOv4ObjectDetector (line 119)
[trainingData, params] = iParseInputsYOLOv4(trainingData,detector,options,mfilename,varargin{:});
detector.ClassNames
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ }
gTruth.LabelDefinitions.Name
ans =
12×1 cell array
{‘lozenge’ }
{‘hexagon’ }
{‘trapezium’ }
{‘heart’ }
{‘semicircle’}
{‘pentagon’ }
{‘star’ }
{‘elliptical’}
{‘rectangle’ }
{‘square’ }
{‘triangle’ }
{‘circle’ } yolov4, classnames MATLAB Answers — New Questions
How to wrote code for Ramp Filter and show the firgure?
Dear All,
Please help me how to plot the Ramp filter as picture attached.Dear All,
Please help me how to plot the Ramp filter as picture attached. Dear All,
Please help me how to plot the Ramp filter as picture attached. image processing, image acquisition, image analysis, digital image processing MATLAB Answers — New Questions
Bar() very thin, does not respond to width argument
I have a problem with Bar() function, look at the screenshot, the bars are very thin. Note that there are no leftover trash from previous work, this is fresh example:I have a problem with Bar() function, look at the screenshot, the bars are very thin. Note that there are no leftover trash from previous work, this is fresh example: I have a problem with Bar() function, look at the screenshot, the bars are very thin. Note that there are no leftover trash from previous work, this is fresh example: bar() MATLAB Answers — New Questions
Why is it doing all 100 attempts as a singular go?
I am working on a bit of code to generate a the probability of an item dropping. I have it set so that its going through an if loop chain, where if it isnt one thing it goes to the next thing and if it isnt that it goes to the next and so forth, but when I try to run it with a for loop to dictate how many times it needs to run it just gives all of the attempts to a singular output giving that one output a probability of 100% each run, which isnt whats supposed to happen.
numOfSims = 100;
potionOfStrength = 0;
braceletOfStrength = 0;
hammerOfThunder = 0;
none = 0;
X = rand;
X2 = rand;
X3 = rand;
for iteration_num = 1:numOfSims
if X<0.4
potionOfStrength = potionOfStrength +1;
else
if X2<0.2
braceletOfStrength = braceletOfStrength +1;
else
if X3<0.2
hammerOfThunder = hammerOfThunder +1;
else
none = none +1;
end
end
end
This is the code I’ve been working on.I am working on a bit of code to generate a the probability of an item dropping. I have it set so that its going through an if loop chain, where if it isnt one thing it goes to the next thing and if it isnt that it goes to the next and so forth, but when I try to run it with a for loop to dictate how many times it needs to run it just gives all of the attempts to a singular output giving that one output a probability of 100% each run, which isnt whats supposed to happen.
numOfSims = 100;
potionOfStrength = 0;
braceletOfStrength = 0;
hammerOfThunder = 0;
none = 0;
X = rand;
X2 = rand;
X3 = rand;
for iteration_num = 1:numOfSims
if X<0.4
potionOfStrength = potionOfStrength +1;
else
if X2<0.2
braceletOfStrength = braceletOfStrength +1;
else
if X3<0.2
hammerOfThunder = hammerOfThunder +1;
else
none = none +1;
end
end
end
This is the code I’ve been working on. I am working on a bit of code to generate a the probability of an item dropping. I have it set so that its going through an if loop chain, where if it isnt one thing it goes to the next thing and if it isnt that it goes to the next and so forth, but when I try to run it with a for loop to dictate how many times it needs to run it just gives all of the attempts to a singular output giving that one output a probability of 100% each run, which isnt whats supposed to happen.
numOfSims = 100;
potionOfStrength = 0;
braceletOfStrength = 0;
hammerOfThunder = 0;
none = 0;
X = rand;
X2 = rand;
X3 = rand;
for iteration_num = 1:numOfSims
if X<0.4
potionOfStrength = potionOfStrength +1;
else
if X2<0.2
braceletOfStrength = braceletOfStrength +1;
else
if X3<0.2
hammerOfThunder = hammerOfThunder +1;
else
none = none +1;
end
end
end
This is the code I’ve been working on. probability, for loop, if statement MATLAB Answers — New Questions
What are the possible reasons for such jumps in the plot?
"exp", "asin", complex numbers are used in the code. What might be the cause of such numerical instability and how can it be solved?"exp", "asin", complex numbers are used in the code. What might be the cause of such numerical instability and how can it be solved? "exp", "asin", complex numbers are used in the code. What might be the cause of such numerical instability and how can it be solved? numerical instability, data jump MATLAB Answers — New Questions
error when using table with specified variable names
Hi guys im trying to join 2 variable string-array and double array by table. I already defined the variable names, but error hapened when i want to create table.Hi guys im trying to join 2 variable string-array and double array by table. I already defined the variable names, but error hapened when i want to create table. Hi guys im trying to join 2 variable string-array and double array by table. I already defined the variable names, but error hapened when i want to create table. table MATLAB Answers — New Questions
Identify which plan turns out to be closest to a reference plan
I have a ‘plane’ (magenta) and a central point of this plane ‘G_plane’.
The cell, on the other hand, contains several ‘planes’ (yellow) and several ‘G_planes’.
file_n = importdata("file_n.mat");
plane = file_n.plane;
G_plane = file_n.G_plane;
group_cel = file_n.group_cel;
figure
plot3(plane(:,1),plane(:,2),plane(:,3),’k.’,’Markersize’,5)
hold on
patch(plane(:,1),plane(:,2),plane(:,3),’m’)
plot3(G_plane(:,1),G_plane(:,2),G_plane(:,3),’k.’,’Markersize’,15)
for k = 2:height(group_cel)
plot3(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’k.’,’Markersize’,5)
patch(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’y’)
plot3(group_cel{k,2}(:,1),group_cel{k,2}(:,2),group_cel{k,2}(:,3),’k.’,’Markersize’,15)
end
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
How can I identify which yellow plane is closest to the magenta plane?
Or, how can I identify which ‘yellow’ point (inside the cell) is closest to the magenta plane?
In this case, the yellow plane closest to the magenta plane is when k=3.I have a ‘plane’ (magenta) and a central point of this plane ‘G_plane’.
The cell, on the other hand, contains several ‘planes’ (yellow) and several ‘G_planes’.
file_n = importdata("file_n.mat");
plane = file_n.plane;
G_plane = file_n.G_plane;
group_cel = file_n.group_cel;
figure
plot3(plane(:,1),plane(:,2),plane(:,3),’k.’,’Markersize’,5)
hold on
patch(plane(:,1),plane(:,2),plane(:,3),’m’)
plot3(G_plane(:,1),G_plane(:,2),G_plane(:,3),’k.’,’Markersize’,15)
for k = 2:height(group_cel)
plot3(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’k.’,’Markersize’,5)
patch(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’y’)
plot3(group_cel{k,2}(:,1),group_cel{k,2}(:,2),group_cel{k,2}(:,3),’k.’,’Markersize’,15)
end
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
How can I identify which yellow plane is closest to the magenta plane?
Or, how can I identify which ‘yellow’ point (inside the cell) is closest to the magenta plane?
In this case, the yellow plane closest to the magenta plane is when k=3. I have a ‘plane’ (magenta) and a central point of this plane ‘G_plane’.
The cell, on the other hand, contains several ‘planes’ (yellow) and several ‘G_planes’.
file_n = importdata("file_n.mat");
plane = file_n.plane;
G_plane = file_n.G_plane;
group_cel = file_n.group_cel;
figure
plot3(plane(:,1),plane(:,2),plane(:,3),’k.’,’Markersize’,5)
hold on
patch(plane(:,1),plane(:,2),plane(:,3),’m’)
plot3(G_plane(:,1),G_plane(:,2),G_plane(:,3),’k.’,’Markersize’,15)
for k = 2:height(group_cel)
plot3(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’k.’,’Markersize’,5)
patch(group_cel{k,1}(:,1),group_cel{k,1}(:,2),group_cel{k,1}(:,3),’y’)
plot3(group_cel{k,2}(:,1),group_cel{k,2}(:,2),group_cel{k,2}(:,3),’k.’,’Markersize’,15)
end
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
How can I identify which yellow plane is closest to the magenta plane?
Or, how can I identify which ‘yellow’ point (inside the cell) is closest to the magenta plane?
In this case, the yellow plane closest to the magenta plane is when k=3. plan, closest MATLAB Answers — New Questions
Non-constant boundary condition for thermal PDE solve
Hello, I am trying to solve a heat transfer problem which contains a 3D geometry. I am using thermal model. I want to use ‘heat transfer cofficient’ as a boundary condition in such a way that it is a non-constant B.C. w.r.t. location on my 3D geometry. I use the function handle and wrap another function called ‘getcoldcofficient’ in it so that I can pass more arguments than only ‘location’ and ‘state’. The ‘h_c’ here is a row vector containing different values which I want to apply on face of my geometry.
cold_coff = …
@(location,state) getcoldcofficient(location,state,h_c);
thermalBC(model2,"Face",[7,8,9,10],"ConvectionCoefficient",cold_coff,"AmbientTemperature",?);
The function ‘getcoldcofficient’ is defined as follows, It extracts the location i, then converts it into a usable index value for my row vector ‘h_c’
function hc = getcoldcofficient(location,state,h_c)
i = round(1000*abs(location.z));
if i == 0
hc = h_c(1);
else
hc = h_c(i);
end
end
Now the issue is that my ‘Ambient temperature’ is also changing at each location and is not a constant, I also have it as a row vector Tc. I want to use a similar function to ‘getcoldcofficient’ to get my ambient temperature at each corresponding index i. But I am not able to do this since ‘Ambient temperature’ only accepts a double type as an input and not a function handle.
To summarize, I want both heat transfer cofficient and its ambient temperature to be no-constant BCs on faces. Can someone help me with this ? Thanks.Hello, I am trying to solve a heat transfer problem which contains a 3D geometry. I am using thermal model. I want to use ‘heat transfer cofficient’ as a boundary condition in such a way that it is a non-constant B.C. w.r.t. location on my 3D geometry. I use the function handle and wrap another function called ‘getcoldcofficient’ in it so that I can pass more arguments than only ‘location’ and ‘state’. The ‘h_c’ here is a row vector containing different values which I want to apply on face of my geometry.
cold_coff = …
@(location,state) getcoldcofficient(location,state,h_c);
thermalBC(model2,"Face",[7,8,9,10],"ConvectionCoefficient",cold_coff,"AmbientTemperature",?);
The function ‘getcoldcofficient’ is defined as follows, It extracts the location i, then converts it into a usable index value for my row vector ‘h_c’
function hc = getcoldcofficient(location,state,h_c)
i = round(1000*abs(location.z));
if i == 0
hc = h_c(1);
else
hc = h_c(i);
end
end
Now the issue is that my ‘Ambient temperature’ is also changing at each location and is not a constant, I also have it as a row vector Tc. I want to use a similar function to ‘getcoldcofficient’ to get my ambient temperature at each corresponding index i. But I am not able to do this since ‘Ambient temperature’ only accepts a double type as an input and not a function handle.
To summarize, I want both heat transfer cofficient and its ambient temperature to be no-constant BCs on faces. Can someone help me with this ? Thanks. Hello, I am trying to solve a heat transfer problem which contains a 3D geometry. I am using thermal model. I want to use ‘heat transfer cofficient’ as a boundary condition in such a way that it is a non-constant B.C. w.r.t. location on my 3D geometry. I use the function handle and wrap another function called ‘getcoldcofficient’ in it so that I can pass more arguments than only ‘location’ and ‘state’. The ‘h_c’ here is a row vector containing different values which I want to apply on face of my geometry.
cold_coff = …
@(location,state) getcoldcofficient(location,state,h_c);
thermalBC(model2,"Face",[7,8,9,10],"ConvectionCoefficient",cold_coff,"AmbientTemperature",?);
The function ‘getcoldcofficient’ is defined as follows, It extracts the location i, then converts it into a usable index value for my row vector ‘h_c’
function hc = getcoldcofficient(location,state,h_c)
i = round(1000*abs(location.z));
if i == 0
hc = h_c(1);
else
hc = h_c(i);
end
end
Now the issue is that my ‘Ambient temperature’ is also changing at each location and is not a constant, I also have it as a row vector Tc. I want to use a similar function to ‘getcoldcofficient’ to get my ambient temperature at each corresponding index i. But I am not able to do this since ‘Ambient temperature’ only accepts a double type as an input and not a function handle.
To summarize, I want both heat transfer cofficient and its ambient temperature to be no-constant BCs on faces. Can someone help me with this ? Thanks. pde MATLAB Answers — New Questions
Lower precision in trainnet workflow
Hi,
Is there a way to adjust the precision when training a network using the "trainnet" workflow (2024a)? I’m interested in lowering precision to speed up training, in the same way I would use "torch.set_float32_matmul_precision" in pytorch.
Thanks,
EricHi,
Is there a way to adjust the precision when training a network using the "trainnet" workflow (2024a)? I’m interested in lowering precision to speed up training, in the same way I would use "torch.set_float32_matmul_precision" in pytorch.
Thanks,
Eric Hi,
Is there a way to adjust the precision when training a network using the "trainnet" workflow (2024a)? I’m interested in lowering precision to speed up training, in the same way I would use "torch.set_float32_matmul_precision" in pytorch.
Thanks,
Eric precision, trainnet MATLAB Answers — New Questions
Best cloud solution for Individual MATLAB license?
I’m currently running an Individual MATLAB license on Windows desktop. I’m running into an issue with storage for data used when running my m scripts. Currently my data totals over 1 TB and I’m wondering if I could/should be utilizing cloud storage rather than the desktop solution with external hard drive. The biggest appeal for me is portability and data backup/redundancy. Does anyone have any experience with using such large datasets on the cloud or recommendations on the best way forward?I’m currently running an Individual MATLAB license on Windows desktop. I’m running into an issue with storage for data used when running my m scripts. Currently my data totals over 1 TB and I’m wondering if I could/should be utilizing cloud storage rather than the desktop solution with external hard drive. The biggest appeal for me is portability and data backup/redundancy. Does anyone have any experience with using such large datasets on the cloud or recommendations on the best way forward? I’m currently running an Individual MATLAB license on Windows desktop. I’m running into an issue with storage for data used when running my m scripts. Currently my data totals over 1 TB and I’m wondering if I could/should be utilizing cloud storage rather than the desktop solution with external hard drive. The biggest appeal for me is portability and data backup/redundancy. Does anyone have any experience with using such large datasets on the cloud or recommendations on the best way forward? cloud, aws, data, storage, windows MATLAB Answers — New Questions
under is my worked to try use root syntax.
% Using the MATLAB function “roots” for find non-zero natural frequencies
% define symbolic variable w
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;
k2 = 100000; k3 = 50; k4 = 75; k5 = 10;
% Set up system matrices
% mass matrix
M = diag([m1, m2, m3, m4, m5]);
% damping matrix
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
% stiffness matrix
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5];
% Calculate frequency equation
Zw = w^2*M + 1i*w*C + K; % impedance matrix
freqEq = det(Zw); % take determinant to get frequency equation
pretty(simplify(freqEq)); % display simplified frequency equation
% Display the non-zero natural frequencies
disp(‘Non-zero natural frequencies (Hz):’);
disp(root(freqEq))% Using the MATLAB function “roots” for find non-zero natural frequencies
% define symbolic variable w
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;
k2 = 100000; k3 = 50; k4 = 75; k5 = 10;
% Set up system matrices
% mass matrix
M = diag([m1, m2, m3, m4, m5]);
% damping matrix
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
% stiffness matrix
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5];
% Calculate frequency equation
Zw = w^2*M + 1i*w*C + K; % impedance matrix
freqEq = det(Zw); % take determinant to get frequency equation
pretty(simplify(freqEq)); % display simplified frequency equation
% Display the non-zero natural frequencies
disp(‘Non-zero natural frequencies (Hz):’);
disp(root(freqEq)) % Using the MATLAB function “roots” for find non-zero natural frequencies
% define symbolic variable w
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10; c3 = 0.5; c4 = 1.50; c5 = 1.1;
k2 = 100000; k3 = 50; k4 = 75; k5 = 10;
% Set up system matrices
% mass matrix
M = diag([m1, m2, m3, m4, m5]);
% damping matrix
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
% stiffness matrix
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5];
% Calculate frequency equation
Zw = w^2*M + 1i*w*C + K; % impedance matrix
freqEq = det(Zw); % take determinant to get frequency equation
pretty(simplify(freqEq)); % display simplified frequency equation
% Display the non-zero natural frequencies
disp(‘Non-zero natural frequencies (Hz):’);
disp(root(freqEq)) matlab MATLAB Answers — New Questions
warning when run 5G link level simulator
Error using save Error closing file D:5G Vienna link levelresultsresults_14-May-2024_23_43_28.mat. The file may be corrupt. Error in main (line 260) save([‘./results/results_’, timeStamp]); MATLAB has experienced a low-level graphics error, and may not have drawn correctly. Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB. To share details of this issue with MathWorks technical support, please include this file with your service request.
when increase subcarrier we get error
Out of memory.
Error in Channel.FastFading/NewRealization (line 622)
ImpulseResponseTemp(obj.Implementation.IndexDelayTaps, 🙂 =
subsampledIR(:, indSubsamp(1:obj.Nr.SamplesTotal));
Error in Channel.FastFading (line 231)
obj.NewRealization(0);
Error in Parameters.SimulationParameters/initializeLinks (line 1794)
Links{linkX, linkY}.Channel = Channel.FastFading(
obj.modulation.samplingRate,…
Error in main (line 60)
Links = simParams.initializeLinks(Links, BS, UE); %#ok
More informationError using save Error closing file D:5G Vienna link levelresultsresults_14-May-2024_23_43_28.mat. The file may be corrupt. Error in main (line 260) save([‘./results/results_’, timeStamp]); MATLAB has experienced a low-level graphics error, and may not have drawn correctly. Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB. To share details of this issue with MathWorks technical support, please include this file with your service request.
when increase subcarrier we get error
Out of memory.
Error in Channel.FastFading/NewRealization (line 622)
ImpulseResponseTemp(obj.Implementation.IndexDelayTaps, 🙂 =
subsampledIR(:, indSubsamp(1:obj.Nr.SamplesTotal));
Error in Channel.FastFading (line 231)
obj.NewRealization(0);
Error in Parameters.SimulationParameters/initializeLinks (line 1794)
Links{linkX, linkY}.Channel = Channel.FastFading(
obj.modulation.samplingRate,…
Error in main (line 60)
Links = simParams.initializeLinks(Links, BS, UE); %#ok
More information Error using save Error closing file D:5G Vienna link levelresultsresults_14-May-2024_23_43_28.mat. The file may be corrupt. Error in main (line 260) save([‘./results/results_’, timeStamp]); MATLAB has experienced a low-level graphics error, and may not have drawn correctly. Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB. To share details of this issue with MathWorks technical support, please include this file with your service request.
when increase subcarrier we get error
Out of memory.
Error in Channel.FastFading/NewRealization (line 622)
ImpulseResponseTemp(obj.Implementation.IndexDelayTaps, 🙂 =
subsampledIR(:, indSubsamp(1:obj.Nr.SamplesTotal));
Error in Channel.FastFading (line 231)
obj.NewRealization(0);
Error in Parameters.SimulationParameters/initializeLinks (line 1794)
Links{linkX, linkY}.Channel = Channel.FastFading(
obj.modulation.samplingRate,…
Error in main (line 60)
Links = simParams.initializeLinks(Links, BS, UE); %#ok
More information 5g link level simulator, noma technology MATLAB Answers — New Questions
In Simscape Rankine Cycle example the Turbine does not rotate
I tried to see how the rankine example worked but could not get my head around.
I have seen that elements like motor convert electrical energy to torque and you can measure it using an Ideal Rotational Motion Sensor:
In the "Rankine Cycle" example you can see a turbine connected to a flow energy:
If you replace the Load by a "Rotational Motion Sensor" it will never change from 0, no matter how much flow passes into the turbine through the ports A and B:
So, my question is why? I saw in the "load" block there is a speed source forcing the turbine to rotate at nominal speed, and summing the linear torque to it but why?I tried to see how the rankine example worked but could not get my head around.
I have seen that elements like motor convert electrical energy to torque and you can measure it using an Ideal Rotational Motion Sensor:
In the "Rankine Cycle" example you can see a turbine connected to a flow energy:
If you replace the Load by a "Rotational Motion Sensor" it will never change from 0, no matter how much flow passes into the turbine through the ports A and B:
So, my question is why? I saw in the "load" block there is a speed source forcing the turbine to rotate at nominal speed, and summing the linear torque to it but why? I tried to see how the rankine example worked but could not get my head around.
I have seen that elements like motor convert electrical energy to torque and you can measure it using an Ideal Rotational Motion Sensor:
In the "Rankine Cycle" example you can see a turbine connected to a flow energy:
If you replace the Load by a "Rotational Motion Sensor" it will never change from 0, no matter how much flow passes into the turbine through the ports A and B:
So, my question is why? I saw in the "load" block there is a speed source forcing the turbine to rotate at nominal speed, and summing the linear torque to it but why? rankine-cycle, turbine, torque, speed, energy MATLAB Answers — New Questions
Is there matlab code to do the mean variance spanning test with short sales constrains?
I found only tests without restrictions, but are there test with restrictions regarding weights of portfolio eleents?I found only tests without restrictions, but are there test with restrictions regarding weights of portfolio eleents? I found only tests without restrictions, but are there test with restrictions regarding weights of portfolio eleents? statistical test, mean varince spanning, portfolio theory MATLAB Answers — New Questions
Speed up Some Code
Hi all. I’m trying to speed up the code below. It’s from the SMOTE function that was wrtitten for MATLAB and works really well. The only thing is that the loops are not fast. I’ve looked at Parfor but that wouldn’t work and I can’t see how I can vectorise it either. It could be I just have to suck it up and wait but just in case, the code is :-
% This is where the magic happens 😉
% X : Observational matrix (rows are observations, columns are variables)
% J : Synthesization vector. It has the same length as the number of
% observations (rows) in X. J determines how many times each
% observation is used as a base for synthesization.
% k : Number of nearest neighbors to consider when synthesizing.
function Xn = simpleSMOTE(X,J,k)
tic
HNSMdl = hnswSearcher(X); % To remove this, comment out this line and replace the HNSMdl below with X
[idx, ~] = knnsearch(HNSMdl,X,’k’,k+1); % Find nearest neighbors (add one to the number of neighbors to find, as observations are their own nearest neighbor)
toc
Xn = nan(sum(J),size(X,2)); % Pre-allocate memory for synthesized observations
% Iterate through observations to create to synthesize new observations
for ii=1:numel(J)
P = randperm(k,J(ii))+1; % Randomize nearest neighbor pick (never pick first nearest neighbor as this is the observation itself)
for jj=1:J(ii)
x = X(idx(ii,1),:); % Observation
xk = X(idx(ii,P(jj)),:); % Nearest neighbor
Xn(sum(J(1:ii-1))+jj,:) = (xk-x)*rand+x; % Synthesize observation
end
end
end
It’s from the ‘for ii’ bit that is slow and there are around 750000 items of 13 variables.
SteveHi all. I’m trying to speed up the code below. It’s from the SMOTE function that was wrtitten for MATLAB and works really well. The only thing is that the loops are not fast. I’ve looked at Parfor but that wouldn’t work and I can’t see how I can vectorise it either. It could be I just have to suck it up and wait but just in case, the code is :-
% This is where the magic happens 😉
% X : Observational matrix (rows are observations, columns are variables)
% J : Synthesization vector. It has the same length as the number of
% observations (rows) in X. J determines how many times each
% observation is used as a base for synthesization.
% k : Number of nearest neighbors to consider when synthesizing.
function Xn = simpleSMOTE(X,J,k)
tic
HNSMdl = hnswSearcher(X); % To remove this, comment out this line and replace the HNSMdl below with X
[idx, ~] = knnsearch(HNSMdl,X,’k’,k+1); % Find nearest neighbors (add one to the number of neighbors to find, as observations are their own nearest neighbor)
toc
Xn = nan(sum(J),size(X,2)); % Pre-allocate memory for synthesized observations
% Iterate through observations to create to synthesize new observations
for ii=1:numel(J)
P = randperm(k,J(ii))+1; % Randomize nearest neighbor pick (never pick first nearest neighbor as this is the observation itself)
for jj=1:J(ii)
x = X(idx(ii,1),:); % Observation
xk = X(idx(ii,P(jj)),:); % Nearest neighbor
Xn(sum(J(1:ii-1))+jj,:) = (xk-x)*rand+x; % Synthesize observation
end
end
end
It’s from the ‘for ii’ bit that is slow and there are around 750000 items of 13 variables.
Steve Hi all. I’m trying to speed up the code below. It’s from the SMOTE function that was wrtitten for MATLAB and works really well. The only thing is that the loops are not fast. I’ve looked at Parfor but that wouldn’t work and I can’t see how I can vectorise it either. It could be I just have to suck it up and wait but just in case, the code is :-
% This is where the magic happens 😉
% X : Observational matrix (rows are observations, columns are variables)
% J : Synthesization vector. It has the same length as the number of
% observations (rows) in X. J determines how many times each
% observation is used as a base for synthesization.
% k : Number of nearest neighbors to consider when synthesizing.
function Xn = simpleSMOTE(X,J,k)
tic
HNSMdl = hnswSearcher(X); % To remove this, comment out this line and replace the HNSMdl below with X
[idx, ~] = knnsearch(HNSMdl,X,’k’,k+1); % Find nearest neighbors (add one to the number of neighbors to find, as observations are their own nearest neighbor)
toc
Xn = nan(sum(J),size(X,2)); % Pre-allocate memory for synthesized observations
% Iterate through observations to create to synthesize new observations
for ii=1:numel(J)
P = randperm(k,J(ii))+1; % Randomize nearest neighbor pick (never pick first nearest neighbor as this is the observation itself)
for jj=1:J(ii)
x = X(idx(ii,1),:); % Observation
xk = X(idx(ii,P(jj)),:); % Nearest neighbor
Xn(sum(J(1:ii-1))+jj,:) = (xk-x)*rand+x; % Synthesize observation
end
end
end
It’s from the ‘for ii’ bit that is slow and there are around 750000 items of 13 variables.
Steve speed, code, loops MATLAB Answers — New Questions
Matlab and Routh criterion for evaluation of K for stability
I am traying to evaluation & solve this system stability for the equation s^3 + 3ks^2 + ( k+2 )s + 4 = 0
I strugling with the k constant .
but need help on how to insert the K as a constant for the ROUTH HURWITZ in matlab .
%%routh hurwitz criteria
clear
clc
%firstly it is required to get first two row of routh matrix
e=input(‘enter the coefficients of characteristic equation: ‘);
disp(‘————————————————————————-‘)
l=length(e);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=e((2*i)-1);
b(i)=e(2*i);
end
else
e1=[e 0];
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
%%now we genrate the remaining rows of routh matrix
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
c(m,n)=-(1/c(m-1,1))*det([c((m-2),1) c((m-2),(n+1));c((m-1),1) c((m-1),(n+1))]);
end
end
disp(‘the routh matrix:’)
disp(c)
%%now we check the stablity of system
if c(:,1)>0
disp(‘System is Stable’)
else
disp(‘System is Unstable’);
endI am traying to evaluation & solve this system stability for the equation s^3 + 3ks^2 + ( k+2 )s + 4 = 0
I strugling with the k constant .
but need help on how to insert the K as a constant for the ROUTH HURWITZ in matlab .
%%routh hurwitz criteria
clear
clc
%firstly it is required to get first two row of routh matrix
e=input(‘enter the coefficients of characteristic equation: ‘);
disp(‘————————————————————————-‘)
l=length(e);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=e((2*i)-1);
b(i)=e(2*i);
end
else
e1=[e 0];
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
%%now we genrate the remaining rows of routh matrix
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
c(m,n)=-(1/c(m-1,1))*det([c((m-2),1) c((m-2),(n+1));c((m-1),1) c((m-1),(n+1))]);
end
end
disp(‘the routh matrix:’)
disp(c)
%%now we check the stablity of system
if c(:,1)>0
disp(‘System is Stable’)
else
disp(‘System is Unstable’);
end I am traying to evaluation & solve this system stability for the equation s^3 + 3ks^2 + ( k+2 )s + 4 = 0
I strugling with the k constant .
but need help on how to insert the K as a constant for the ROUTH HURWITZ in matlab .
%%routh hurwitz criteria
clear
clc
%firstly it is required to get first two row of routh matrix
e=input(‘enter the coefficients of characteristic equation: ‘);
disp(‘————————————————————————-‘)
l=length(e);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=e((2*i)-1);
b(i)=e(2*i);
end
else
e1=[e 0];
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
%%now we genrate the remaining rows of routh matrix
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
c(m,n)=-(1/c(m-1,1))*det([c((m-2),1) c((m-2),(n+1));c((m-1),1) c((m-1),(n+1))]);
end
end
disp(‘the routh matrix:’)
disp(c)
%%now we check the stablity of system
if c(:,1)>0
disp(‘System is Stable’)
else
disp(‘System is Unstable’);
end guide, matlab MATLAB Answers — New Questions
Can use help me. Using the eliminant, determine the frequency equation of the system
% using the eliminant, determine the frequency equation of the system
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10000; c3 = 500; c4 = 1500; c5 = 1100;
k2 = 100000000; k3 = 50000; k4 = 75000; k5 = 10000;
% Mass, damping, and stiffness matrices
M = diag([m1, m2, m3, m4, m5]);
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5];% using the eliminant, determine the frequency equation of the system
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10000; c3 = 500; c4 = 1500; c5 = 1100;
k2 = 100000000; k3 = 50000; k4 = 75000; k5 = 10000;
% Mass, damping, and stiffness matrices
M = diag([m1, m2, m3, m4, m5]);
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5]; % using the eliminant, determine the frequency equation of the system
syms w;
% Given parameters
m1 = 1.8; m2 = 6.3; m3 = 5.4; m4 = 22.5; m5 = 54;
c2 = 10000; c3 = 500; c4 = 1500; c5 = 1100;
k2 = 100000000; k3 = 50000; k4 = 75000; k5 = 10000;
% Mass, damping, and stiffness matrices
M = diag([m1, m2, m3, m4, m5]);
C = [c2 -c2 0 0 0;
-c2 c2+c3 -c3 0 0;
0 -c3 c3+c4 -c4 0;
0 0 -c4 c4+c5 -c5;
0 0 0 -c5 c5];
K = [k2 -k2 0 0 0;
-k2 k2+k3 -k3 0 0;
0 -k3 k3+k4 -k4 0;
0 0 -k4 k4+k5 -k5;
0 0 0 -k5 k5]; matlab, vibration MATLAB Answers — New Questions
Google Earth Trajectory Path
I want to show the path drawn by our rocket on google earth. However, I need to make it inclined as in the link below. How can I do this?
Most probably I need to use sin and cos functions, but I don’t know what to write according to.
http://www.spacemig.com/path-in/I want to show the path drawn by our rocket on google earth. However, I need to make it inclined as in the link below. How can I do this?
Most probably I need to use sin and cos functions, but I don’t know what to write according to.
http://www.spacemig.com/path-in/ I want to show the path drawn by our rocket on google earth. However, I need to make it inclined as in the link below. How can I do this?
Most probably I need to use sin and cos functions, but I don’t know what to write according to.
http://www.spacemig.com/path-in/ google, matlab gui, kml, kmz, earth, matlab code, matlab function, matlab, trajectory, aerospace, rocket, path MATLAB Answers — New Questions
How can I get the energy of a wave?
I used signal analyzer to analyze a wave of the sound.
Now I would like to calculate the energy of the sound.
My idea is to firstly squared the amplitude and then integrated the whole wave.
I have squared the amplitude and got the diagram of squared amplitude v.s. time.
However, I don’t know how to integrate this wave without having a wavefunction.
How could I do? Thank you.I used signal analyzer to analyze a wave of the sound.
Now I would like to calculate the energy of the sound.
My idea is to firstly squared the amplitude and then integrated the whole wave.
I have squared the amplitude and got the diagram of squared amplitude v.s. time.
However, I don’t know how to integrate this wave without having a wavefunction.
How could I do? Thank you. I used signal analyzer to analyze a wave of the sound.
Now I would like to calculate the energy of the sound.
My idea is to firstly squared the amplitude and then integrated the whole wave.
I have squared the amplitude and got the diagram of squared amplitude v.s. time.
However, I don’t know how to integrate this wave without having a wavefunction.
How could I do? Thank you. signal, integration MATLAB Answers — New Questions