Tag Archives: matlab
how to make transformation in mp4 vedio
i have two vedio of mp4.i want to apply some tranformation on it and run the tranform vedio.i have wriiten the code but contently facing the error.i even tried "NumberOfFrames" but it is unrecongnized in my matlab
code is here
% read videos
vid1 = VideoReader(‘video1.mp4’);
vid2 = VideoReader(‘vedio2.mp4’);
% read first frame from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% create a figure
fig = figure;
while hasFrame(vid1) && hasFrame(vid2)
% read frames from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% perform geometric transformations
frame1_scaled = imresize(frame1, 0.5);
frame1_sheared = imresize(frame1, [size(frame1,1) size(frame1,2)*0.8]);
frame1_rotated = imrotate(frame1, 30, ‘crop’);
frame2_scaled = imresize(frame2, 0.5);
frame2_sheared = imresize(frame2, [size(frame2,1) size(frame2,2)*0.8]);
frame2_rotated = imrotate(frame2, -30, ‘crop’);
% concatenate frames
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), …
cat(1, frame2, frame2_scaled, frame2_sheared, frame2_rotated));
% display frames
imshow(combined_frame, ‘Parent’, fig);
drawnow;
end
error that i facing is
Error using cat
Dimensions
of
arrays
being
concatenated
are
not
consistent.
Error in untitled (line 27)
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), …i have two vedio of mp4.i want to apply some tranformation on it and run the tranform vedio.i have wriiten the code but contently facing the error.i even tried "NumberOfFrames" but it is unrecongnized in my matlab
code is here
% read videos
vid1 = VideoReader(‘video1.mp4’);
vid2 = VideoReader(‘vedio2.mp4’);
% read first frame from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% create a figure
fig = figure;
while hasFrame(vid1) && hasFrame(vid2)
% read frames from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% perform geometric transformations
frame1_scaled = imresize(frame1, 0.5);
frame1_sheared = imresize(frame1, [size(frame1,1) size(frame1,2)*0.8]);
frame1_rotated = imrotate(frame1, 30, ‘crop’);
frame2_scaled = imresize(frame2, 0.5);
frame2_sheared = imresize(frame2, [size(frame2,1) size(frame2,2)*0.8]);
frame2_rotated = imrotate(frame2, -30, ‘crop’);
% concatenate frames
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), …
cat(1, frame2, frame2_scaled, frame2_sheared, frame2_rotated));
% display frames
imshow(combined_frame, ‘Parent’, fig);
drawnow;
end
error that i facing is
Error using cat
Dimensions
of
arrays
being
concatenated
are
not
consistent.
Error in untitled (line 27)
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), … i have two vedio of mp4.i want to apply some tranformation on it and run the tranform vedio.i have wriiten the code but contently facing the error.i even tried "NumberOfFrames" but it is unrecongnized in my matlab
code is here
% read videos
vid1 = VideoReader(‘video1.mp4’);
vid2 = VideoReader(‘vedio2.mp4’);
% read first frame from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% create a figure
fig = figure;
while hasFrame(vid1) && hasFrame(vid2)
% read frames from each video
frame1 = readFrame(vid1);
frame2 = readFrame(vid2);
% perform geometric transformations
frame1_scaled = imresize(frame1, 0.5);
frame1_sheared = imresize(frame1, [size(frame1,1) size(frame1,2)*0.8]);
frame1_rotated = imrotate(frame1, 30, ‘crop’);
frame2_scaled = imresize(frame2, 0.5);
frame2_sheared = imresize(frame2, [size(frame2,1) size(frame2,2)*0.8]);
frame2_rotated = imrotate(frame2, -30, ‘crop’);
% concatenate frames
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), …
cat(1, frame2, frame2_scaled, frame2_sheared, frame2_rotated));
% display frames
imshow(combined_frame, ‘Parent’, fig);
drawnow;
end
error that i facing is
Error using cat
Dimensions
of
arrays
being
concatenated
are
not
consistent.
Error in untitled (line 27)
combined_frame = cat(2, cat(1, frame1, frame1_scaled, frame1_sheared, frame1_rotated), … video processing, transformation MATLAB Answers — New Questions
Correct way to calculate the dominant frequency of time series signal?
My dataset consists of two parameters: time (in micro second) and amplitude (Attached):
I am particularly interested in analyzing the fluctuation of the dominant frequency across the entire dataset. Additionally, I want to examine how the frequency content changes as a function of time. For instance, in time intervals such as 0–200 ms, 100–300 ms, 300–500 ms, and so on.
I attempted multiple approaches, but the results are not very consistent. I would be interested in getting a second opinion.
Thanks in Advance!My dataset consists of two parameters: time (in micro second) and amplitude (Attached):
I am particularly interested in analyzing the fluctuation of the dominant frequency across the entire dataset. Additionally, I want to examine how the frequency content changes as a function of time. For instance, in time intervals such as 0–200 ms, 100–300 ms, 300–500 ms, and so on.
I attempted multiple approaches, but the results are not very consistent. I would be interested in getting a second opinion.
Thanks in Advance! My dataset consists of two parameters: time (in micro second) and amplitude (Attached):
I am particularly interested in analyzing the fluctuation of the dominant frequency across the entire dataset. Additionally, I want to examine how the frequency content changes as a function of time. For instance, in time intervals such as 0–200 ms, 100–300 ms, 300–500 ms, and so on.
I attempted multiple approaches, but the results are not very consistent. I would be interested in getting a second opinion.
Thanks in Advance! time series, fft MATLAB Answers — New Questions
prev value in a stateflow chart
Stateflow documentation:
…To detect changes, the chart automatically double-buffers these values in local variables, as follows:
var_name_prev Value of data at the beginning of the last time step
var_name_start Value of data at the beginning of the current time step
Question: do I have read access to the buffered variables? I want to use them for calculations inside the stateflow chart.Stateflow documentation:
…To detect changes, the chart automatically double-buffers these values in local variables, as follows:
var_name_prev Value of data at the beginning of the last time step
var_name_start Value of data at the beginning of the current time step
Question: do I have read access to the buffered variables? I want to use them for calculations inside the stateflow chart. Stateflow documentation:
…To detect changes, the chart automatically double-buffers these values in local variables, as follows:
var_name_prev Value of data at the beginning of the last time step
var_name_start Value of data at the beginning of the current time step
Question: do I have read access to the buffered variables? I want to use them for calculations inside the stateflow chart. stateflow, double-buffer MATLAB Answers — New Questions
How to arrange elements in one array to match the position of elements in a second array?
If I have two arrays A and B as displayed below, how can I rearrange B such that a new boolean array Ba which corresponds to the values of array B can be resorted according to the values of array A instead?
For example, if I have:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
B =
1 2 2 2 3 3 4 4 5 5
2 1 1 2 0 1 0 1 0 1
30 18 25 25 -1 23 -1 30 -1 22
Ba =
0 0 1 0 1 0 0 0 0 0
Note that array B is simply the sorted version of array A according to the first row in an ascended order. It is resorted twice according to the second row in an ascended order for the values in row 1 that equal one another (e.g., if there are multiples elements equal to 3 in row 1, then the array will sort by the second row instead, so if the second row has values 3 3 3 3 3; 2 6 3 9 1, it will then be sorted to 3 3 3 3 3; 1 2 3 6 9)
I only mentioned this in case reverse sorting might work easier than entirely rearranging the position of the array.
I want to rearrange array B and Ba such that it corresponds to the positioning of array A.
So the new arrays would look like this:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
Aa =
0 0 0 0 0 0 0 1 1 0
The new array would essentially match A, and the array Aa is the same array Ba but now rearranged so that it follows the arrangement of A rather than B.
I am not entirely sure how to write the MATLAB code to accomplish this. All help is appreciated!If I have two arrays A and B as displayed below, how can I rearrange B such that a new boolean array Ba which corresponds to the values of array B can be resorted according to the values of array A instead?
For example, if I have:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
B =
1 2 2 2 3 3 4 4 5 5
2 1 1 2 0 1 0 1 0 1
30 18 25 25 -1 23 -1 30 -1 22
Ba =
0 0 1 0 1 0 0 0 0 0
Note that array B is simply the sorted version of array A according to the first row in an ascended order. It is resorted twice according to the second row in an ascended order for the values in row 1 that equal one another (e.g., if there are multiples elements equal to 3 in row 1, then the array will sort by the second row instead, so if the second row has values 3 3 3 3 3; 2 6 3 9 1, it will then be sorted to 3 3 3 3 3; 1 2 3 6 9)
I only mentioned this in case reverse sorting might work easier than entirely rearranging the position of the array.
I want to rearrange array B and Ba such that it corresponds to the positioning of array A.
So the new arrays would look like this:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
Aa =
0 0 0 0 0 0 0 1 1 0
The new array would essentially match A, and the array Aa is the same array Ba but now rearranged so that it follows the arrangement of A rather than B.
I am not entirely sure how to write the MATLAB code to accomplish this. All help is appreciated! If I have two arrays A and B as displayed below, how can I rearrange B such that a new boolean array Ba which corresponds to the values of array B can be resorted according to the values of array A instead?
For example, if I have:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
B =
1 2 2 2 3 3 4 4 5 5
2 1 1 2 0 1 0 1 0 1
30 18 25 25 -1 23 -1 30 -1 22
Ba =
0 0 1 0 1 0 0 0 0 0
Note that array B is simply the sorted version of array A according to the first row in an ascended order. It is resorted twice according to the second row in an ascended order for the values in row 1 that equal one another (e.g., if there are multiples elements equal to 3 in row 1, then the array will sort by the second row instead, so if the second row has values 3 3 3 3 3; 2 6 3 9 1, it will then be sorted to 3 3 3 3 3; 1 2 3 6 9)
I only mentioned this in case reverse sorting might work easier than entirely rearranging the position of the array.
I want to rearrange array B and Ba such that it corresponds to the positioning of array A.
So the new arrays would look like this:
A =
1 5 3 2 4 4 2 2 3 5
2 1 1 2 0 1 1 1 0 0
30 22 23 25 -1 30 18 25 -1 -1
Aa =
0 0 0 0 0 0 0 1 1 0
The new array would essentially match A, and the array Aa is the same array Ba but now rearranged so that it follows the arrangement of A rather than B.
I am not entirely sure how to write the MATLAB code to accomplish this. All help is appreciated! array, sort MATLAB Answers — New Questions
STL to solid 3d matrix
Is there a way to import STL and save it as 3D matrix and stlil maintain its size? Patch is a good function to import stl, I need voxelisation of the mesh so I can slice the 2D data out of it.
This is a good work by Adam , but it does not maintain the size and ratio:
https://uk.mathworks.com/matlabcentral/fileexchange/27390-mesh-voxelisation
RegardsIs there a way to import STL and save it as 3D matrix and stlil maintain its size? Patch is a good function to import stl, I need voxelisation of the mesh so I can slice the 2D data out of it.
This is a good work by Adam , but it does not maintain the size and ratio:
https://uk.mathworks.com/matlabcentral/fileexchange/27390-mesh-voxelisation
Regards Is there a way to import STL and save it as 3D matrix and stlil maintain its size? Patch is a good function to import stl, I need voxelisation of the mesh so I can slice the 2D data out of it.
This is a good work by Adam , but it does not maintain the size and ratio:
https://uk.mathworks.com/matlabcentral/fileexchange/27390-mesh-voxelisation
Regards stl, patch, voxelisation MATLAB Answers — New Questions
How to get the values of x axis only visible at the bottom subplots?
Hi,
I have a series of subplots (5×4). Every subplot has the same x axis and the same limits. At the moment, I have the values of x axis visible in every subplot. I would like to have the values only visible at the bottom subplots, so that the figure would be simpler. I already edited the code so that the x label is only visible at the bottom subplots. But how do I do the same to the x axis values?
I tried turning of the ‘XTick’
set(gca,’XTick’,[]);
This worked, however, now the grid also turned off. How can I get the values to be only at the bottom subplots, and the grid on?
The same goes for y axis. I only want the values of the y axis to be visible at the left subplots.
Thank you in advance for any answers!Hi,
I have a series of subplots (5×4). Every subplot has the same x axis and the same limits. At the moment, I have the values of x axis visible in every subplot. I would like to have the values only visible at the bottom subplots, so that the figure would be simpler. I already edited the code so that the x label is only visible at the bottom subplots. But how do I do the same to the x axis values?
I tried turning of the ‘XTick’
set(gca,’XTick’,[]);
This worked, however, now the grid also turned off. How can I get the values to be only at the bottom subplots, and the grid on?
The same goes for y axis. I only want the values of the y axis to be visible at the left subplots.
Thank you in advance for any answers! Hi,
I have a series of subplots (5×4). Every subplot has the same x axis and the same limits. At the moment, I have the values of x axis visible in every subplot. I would like to have the values only visible at the bottom subplots, so that the figure would be simpler. I already edited the code so that the x label is only visible at the bottom subplots. But how do I do the same to the x axis values?
I tried turning of the ‘XTick’
set(gca,’XTick’,[]);
This worked, however, now the grid also turned off. How can I get the values to be only at the bottom subplots, and the grid on?
The same goes for y axis. I only want the values of the y axis to be visible at the left subplots.
Thank you in advance for any answers! subplot, axes, xlabel, xvalue MATLAB Answers — New Questions
Are dlnetworks supposed to be allowed to have output layers?
Are dlnetworks allowed to have output layers? In the following code, I manage to create one, so the answer would seem to be yes.
layers= [imageInputLayer([1,1,1]) , reluLayer(Name=’relu’) ] ;
dln = replaceLayer( dlnetwork(layers) ,’relu’, regressionLayer);
class(dln)
dln.Layers
However, when I try to create this more directly, an error is raised:
dln = dlnetwork( [imageInputLayer([1,1,1]) , regressionLayer] )
Have I found an unintended backdoor?Are dlnetworks allowed to have output layers? In the following code, I manage to create one, so the answer would seem to be yes.
layers= [imageInputLayer([1,1,1]) , reluLayer(Name=’relu’) ] ;
dln = replaceLayer( dlnetwork(layers) ,’relu’, regressionLayer);
class(dln)
dln.Layers
However, when I try to create this more directly, an error is raised:
dln = dlnetwork( [imageInputLayer([1,1,1]) , regressionLayer] )
Have I found an unintended backdoor? Are dlnetworks allowed to have output layers? In the following code, I manage to create one, so the answer would seem to be yes.
layers= [imageInputLayer([1,1,1]) , reluLayer(Name=’relu’) ] ;
dln = replaceLayer( dlnetwork(layers) ,’relu’, regressionLayer);
class(dln)
dln.Layers
However, when I try to create this more directly, an error is raised:
dln = dlnetwork( [imageInputLayer([1,1,1]) , regressionLayer] )
Have I found an unintended backdoor? dlnetwork, output layer MATLAB Answers — New Questions
Inserting Table from Matlab into Powerpoint slide
Does anyone know how to insert a table from MATLAB to a powerpoint slide?
For example:
header = cell{1,3};
header = {‘Header1’ ‘Header2’ ‘Header 3’};
data= [1, 2, 3;
1, 4, 9;];
How would one output this to powerpoint? I’ve seen the Matlab figures to powerpoint copying and pasting, but not sure how to insert a table.
Thanks for your help!Does anyone know how to insert a table from MATLAB to a powerpoint slide?
For example:
header = cell{1,3};
header = {‘Header1’ ‘Header2’ ‘Header 3’};
data= [1, 2, 3;
1, 4, 9;];
How would one output this to powerpoint? I’ve seen the Matlab figures to powerpoint copying and pasting, but not sure how to insert a table.
Thanks for your help! Does anyone know how to insert a table from MATLAB to a powerpoint slide?
For example:
header = cell{1,3};
header = {‘Header1’ ‘Header2’ ‘Header 3’};
data= [1, 2, 3;
1, 4, 9;];
How would one output this to powerpoint? I’ve seen the Matlab figures to powerpoint copying and pasting, but not sure how to insert a table.
Thanks for your help! powerpoint, table, inserting MATLAB Answers — New Questions
IK solver algorithm fminconsqp performance (2025a prerelease)
Hello everyone,
I’ve been testing 2025a prerelease matlab version’s new IK solver algorithm fminconsqp with default parameters, but BFGS with random restart enabled (while keeping other parameters default) still seems more powerful.
Am I missing something? I can’t quite figure out the advantage of this new solver.
Thanks in advance!Hello everyone,
I’ve been testing 2025a prerelease matlab version’s new IK solver algorithm fminconsqp with default parameters, but BFGS with random restart enabled (while keeping other parameters default) still seems more powerful.
Am I missing something? I can’t quite figure out the advantage of this new solver.
Thanks in advance! Hello everyone,
I’ve been testing 2025a prerelease matlab version’s new IK solver algorithm fminconsqp with default parameters, but BFGS with random restart enabled (while keeping other parameters default) still seems more powerful.
Am I missing something? I can’t quite figure out the advantage of this new solver.
Thanks in advance! matlab MATLAB Answers — New Questions
How to ensure that all values are not equal when using the ecef2enu function
I’m doing coordinate system transformation using the ecef2enu function. But for some reason, all three E, N, and U values are the same. I wonder why. How can I modify it to get the exact value?
Isn’t it normal for the 1, 2, 3 matrices to have different values? Is there something wrong with my code?
currTime = gnss.SensorModel.InitialTime;
setup(scene)
wgs84 = wgs84Ellipsoid(‘meter’);
while scene.IsRunning
[~,~,p,satPos,status] = gnss.read ();
allSatPos = gnssconstellation(currTime); % ecef
currTime = currTime + seconds(1/scene.UpdateRate);
[~,trueRecPos] = plat.read; % lla
trueRecPos_ecef = lla2ecef(trueRecPos); % uav ecef
[az,el] = lookangles(trueRecPos,satPos,gnss.SensorModel.MaskAngle);
nsat = length(satPos(:,1));
enu_sat = zeros(nsat,3);
for k = 1:1:nsat
enu_sat(k,:) = ecef2enu(satPos(k,1),satPos(k,2),satPos(k,3),trueRecPos(1),trueRecPos(2),trueRecPos(3),wgs84);
end
temp=1;
unit_sat = normalize(enu_sat,’norm’,1);
target_z = 500;
scale_factors = target_z ./ unit_sat(:,3);
unit_sat_scaled = unit_sat .* scale_factors;
endI’m doing coordinate system transformation using the ecef2enu function. But for some reason, all three E, N, and U values are the same. I wonder why. How can I modify it to get the exact value?
Isn’t it normal for the 1, 2, 3 matrices to have different values? Is there something wrong with my code?
currTime = gnss.SensorModel.InitialTime;
setup(scene)
wgs84 = wgs84Ellipsoid(‘meter’);
while scene.IsRunning
[~,~,p,satPos,status] = gnss.read ();
allSatPos = gnssconstellation(currTime); % ecef
currTime = currTime + seconds(1/scene.UpdateRate);
[~,trueRecPos] = plat.read; % lla
trueRecPos_ecef = lla2ecef(trueRecPos); % uav ecef
[az,el] = lookangles(trueRecPos,satPos,gnss.SensorModel.MaskAngle);
nsat = length(satPos(:,1));
enu_sat = zeros(nsat,3);
for k = 1:1:nsat
enu_sat(k,:) = ecef2enu(satPos(k,1),satPos(k,2),satPos(k,3),trueRecPos(1),trueRecPos(2),trueRecPos(3),wgs84);
end
temp=1;
unit_sat = normalize(enu_sat,’norm’,1);
target_z = 500;
scale_factors = target_z ./ unit_sat(:,3);
unit_sat_scaled = unit_sat .* scale_factors;
end I’m doing coordinate system transformation using the ecef2enu function. But for some reason, all three E, N, and U values are the same. I wonder why. How can I modify it to get the exact value?
Isn’t it normal for the 1, 2, 3 matrices to have different values? Is there something wrong with my code?
currTime = gnss.SensorModel.InitialTime;
setup(scene)
wgs84 = wgs84Ellipsoid(‘meter’);
while scene.IsRunning
[~,~,p,satPos,status] = gnss.read ();
allSatPos = gnssconstellation(currTime); % ecef
currTime = currTime + seconds(1/scene.UpdateRate);
[~,trueRecPos] = plat.read; % lla
trueRecPos_ecef = lla2ecef(trueRecPos); % uav ecef
[az,el] = lookangles(trueRecPos,satPos,gnss.SensorModel.MaskAngle);
nsat = length(satPos(:,1));
enu_sat = zeros(nsat,3);
for k = 1:1:nsat
enu_sat(k,:) = ecef2enu(satPos(k,1),satPos(k,2),satPos(k,3),trueRecPos(1),trueRecPos(2),trueRecPos(3),wgs84);
end
temp=1;
unit_sat = normalize(enu_sat,’norm’,1);
target_z = 500;
scale_factors = target_z ./ unit_sat(:,3);
unit_sat_scaled = unit_sat .* scale_factors;
end optimization, gnss, ecef2enu, enu, ecef MATLAB Answers — New Questions
Why is my Simulink Desktop Real-Time simulation very slow or halts in Windows when Hyper-V is enabled?
I am trying to use Simulink Desktop Real-Time (SLDRT) on my Windows machine, but when I launch the example model "sldrtex_vdp.slx", it runs very slow, halts, or may even cause a blue-screen.
The following warning message may be prompted out:
Warning: The "Real-Time Synchronization" block has timed out while
trying to synchronize to real-time kernel.
The following warning messages may be shown in Diagnostic Viewer:
Model sldrtex_vdp loaded
A disconnect message was sent to the target 10 seconds ago. Waiting for response.. [6 similar]
Never received disconnect response from target. Disconnecting…
Model sldrtex_vdp unloaded
Additionally, I may see the following error message during the kernel installation (since R2019b) or when trying to run a real-time simulation (since R2020b):
The Hyper-V hypervisor has been detected. The Simulink Desktop Real-Time kernel
cannot run in the presence of the hypervisor. Please disable the Hyper-V operating
system component before attempting to use Simulink Desktop Real-Time.I am trying to use Simulink Desktop Real-Time (SLDRT) on my Windows machine, but when I launch the example model "sldrtex_vdp.slx", it runs very slow, halts, or may even cause a blue-screen.
The following warning message may be prompted out:
Warning: The "Real-Time Synchronization" block has timed out while
trying to synchronize to real-time kernel.
The following warning messages may be shown in Diagnostic Viewer:
Model sldrtex_vdp loaded
A disconnect message was sent to the target 10 seconds ago. Waiting for response.. [6 similar]
Never received disconnect response from target. Disconnecting…
Model sldrtex_vdp unloaded
Additionally, I may see the following error message during the kernel installation (since R2019b) or when trying to run a real-time simulation (since R2020b):
The Hyper-V hypervisor has been detected. The Simulink Desktop Real-Time kernel
cannot run in the presence of the hypervisor. Please disable the Hyper-V operating
system component before attempting to use Simulink Desktop Real-Time. I am trying to use Simulink Desktop Real-Time (SLDRT) on my Windows machine, but when I launch the example model "sldrtex_vdp.slx", it runs very slow, halts, or may even cause a blue-screen.
The following warning message may be prompted out:
Warning: The "Real-Time Synchronization" block has timed out while
trying to synchronize to real-time kernel.
The following warning messages may be shown in Diagnostic Viewer:
Model sldrtex_vdp loaded
A disconnect message was sent to the target 10 seconds ago. Waiting for response.. [6 similar]
Never received disconnect response from target. Disconnecting…
Model sldrtex_vdp unloaded
Additionally, I may see the following error message during the kernel installation (since R2019b) or when trying to run a real-time simulation (since R2020b):
The Hyper-V hypervisor has been detected. The Simulink Desktop Real-Time kernel
cannot run in the presence of the hypervisor. Please disable the Hyper-V operating
system component before attempting to use Simulink Desktop Real-Time. slow, timeout, sldrt, bluescreen, bsod, hyper-v, hypervisor MATLAB Answers — New Questions
Abnormally high reaction force in Simscape Multibody
Hello,
I have a simscape model of a hexapod robot which I am trying to make traverse over a small obstacle. When walking on the regular floor object, the robot is fine. However, as soon as the first leg makes contact with the obstacle, it experiences an abnormally high normal reaction force, causing the whole robot to get sent flying into the air. I am not sure why this is happening. The settings for the spatial contact forces between the floor object and the obstacle object are identical. Here is a video from the mechanics explorer (apologies for the speed, it may have to be watched on 0.25x playback).
I have tried everything I can think of – tweaking stiffness and damping parameters (K_obs and C_obs) and trying different solver settings/tolerances. Drastically reducing the stiffness and damping coefficients does help, but results in the legs of the robot sinking several millimetres through the obstacle.
I have attached a zip file containing the full project. To run the model, open and run HexMaster.m. Then, run adeept.slx. Any help would be massively appreciated.Hello,
I have a simscape model of a hexapod robot which I am trying to make traverse over a small obstacle. When walking on the regular floor object, the robot is fine. However, as soon as the first leg makes contact with the obstacle, it experiences an abnormally high normal reaction force, causing the whole robot to get sent flying into the air. I am not sure why this is happening. The settings for the spatial contact forces between the floor object and the obstacle object are identical. Here is a video from the mechanics explorer (apologies for the speed, it may have to be watched on 0.25x playback).
I have tried everything I can think of – tweaking stiffness and damping parameters (K_obs and C_obs) and trying different solver settings/tolerances. Drastically reducing the stiffness and damping coefficients does help, but results in the legs of the robot sinking several millimetres through the obstacle.
I have attached a zip file containing the full project. To run the model, open and run HexMaster.m. Then, run adeept.slx. Any help would be massively appreciated. Hello,
I have a simscape model of a hexapod robot which I am trying to make traverse over a small obstacle. When walking on the regular floor object, the robot is fine. However, as soon as the first leg makes contact with the obstacle, it experiences an abnormally high normal reaction force, causing the whole robot to get sent flying into the air. I am not sure why this is happening. The settings for the spatial contact forces between the floor object and the obstacle object are identical. Here is a video from the mechanics explorer (apologies for the speed, it may have to be watched on 0.25x playback).
I have tried everything I can think of – tweaking stiffness and damping parameters (K_obs and C_obs) and trying different solver settings/tolerances. Drastically reducing the stiffness and damping coefficients does help, but results in the legs of the robot sinking several millimetres through the obstacle.
I have attached a zip file containing the full project. To run the model, open and run HexMaster.m. Then, run adeept.slx. Any help would be massively appreciated. simscape, multibody MATLAB Answers — New Questions
regarding to your support
I hope you well receive this messege as well.
I am happy jion for your site.
I start to do project on UAV
kindy could you please send me you tube, documets regarding to quadrotror mathlab simulink?
Please help meI hope you well receive this messege as well.
I am happy jion for your site.
I start to do project on UAV
kindy could you please send me you tube, documets regarding to quadrotror mathlab simulink?
Please help me I hope you well receive this messege as well.
I am happy jion for your site.
I start to do project on UAV
kindy could you please send me you tube, documets regarding to quadrotror mathlab simulink?
Please help me uav MATLAB Answers — New Questions
Is it possible to orient the legend’s symbols vertically instead of horizontally?
Is it possible to orient the legend’s symbols vertically instead of horizontally?
In the following example, the red and blue lines in the legend are horizontally oriented, but I would like them to be vertically oriented within the legend:
x = linspace(0, 10, 100);
y1 = sin(x);
y2 = cos(x);
plot(x, y1, ‘red’, x, y2, ‘blue’);
hold on;
h1 = plot(nan, nan, ‘red’, ‘LineWidth’, 2);
h2 = plot(nan, nan, ‘blue’, ‘LineWidth’, 2);
legend([h1, h2], ‘sin(x)’, ‘cos(x)’);Is it possible to orient the legend’s symbols vertically instead of horizontally?
In the following example, the red and blue lines in the legend are horizontally oriented, but I would like them to be vertically oriented within the legend:
x = linspace(0, 10, 100);
y1 = sin(x);
y2 = cos(x);
plot(x, y1, ‘red’, x, y2, ‘blue’);
hold on;
h1 = plot(nan, nan, ‘red’, ‘LineWidth’, 2);
h2 = plot(nan, nan, ‘blue’, ‘LineWidth’, 2);
legend([h1, h2], ‘sin(x)’, ‘cos(x)’); Is it possible to orient the legend’s symbols vertically instead of horizontally?
In the following example, the red and blue lines in the legend are horizontally oriented, but I would like them to be vertically oriented within the legend:
x = linspace(0, 10, 100);
y1 = sin(x);
y2 = cos(x);
plot(x, y1, ‘red’, x, y2, ‘blue’);
hold on;
h1 = plot(nan, nan, ‘red’, ‘LineWidth’, 2);
h2 = plot(nan, nan, ‘blue’, ‘LineWidth’, 2);
legend([h1, h2], ‘sin(x)’, ‘cos(x)’); legend, symbols, lines, plot MATLAB Answers — New Questions
Why do I receive the error: Unrecognized function or variable ‘V_o’?
Please guide me to solve the following error:
Warning: The specified buffer for ‘Convertidor_Boost/Mean/Model/Transport Delay’ was too small. During simulation, the buffer size was
temporarily increased to 106496. In order to generate code, you need to update the buffer size parameter
Unrecognized function or variable ‘V_o’.
Error in Run_Convertidor_Boost (line 62)
plot(tt1,V_o)
Thank you so much,
Edwin Rodríguez JiménezPlease guide me to solve the following error:
Warning: The specified buffer for ‘Convertidor_Boost/Mean/Model/Transport Delay’ was too small. During simulation, the buffer size was
temporarily increased to 106496. In order to generate code, you need to update the buffer size parameter
Unrecognized function or variable ‘V_o’.
Error in Run_Convertidor_Boost (line 62)
plot(tt1,V_o)
Thank you so much,
Edwin Rodríguez Jiménez Please guide me to solve the following error:
Warning: The specified buffer for ‘Convertidor_Boost/Mean/Model/Transport Delay’ was too small. During simulation, the buffer size was
temporarily increased to 106496. In order to generate code, you need to update the buffer size parameter
Unrecognized function or variable ‘V_o’.
Error in Run_Convertidor_Boost (line 62)
plot(tt1,V_o)
Thank you so much,
Edwin Rodríguez Jiménez ftt, matlab, simulink MATLAB Answers — New Questions
Managing preferences does not work for add ons explorer issue
I was trying to get the Field Trip Toolbox as an add on, and https://in.mathworks.com/matlabcentral/answers/60662-how-do-i-install-fieldtrip-toolbox tells me that installing it from https://www.fieldtriptoolbox.org/ doesn’t go well.
I tried regenerating preferences, as stated in https://www.mathworks.com/matlabcentral/answers/99625-how-do-i-regenerate-my-matlab-preferences, but to no avail. I still get the message:
Error in matab.internal.addons.launchers.showExplorer (line 134)
matlab.internal.addons.Explorer.getInstance.show(navigationData);
Is there no other way than to reinstall the whole package?I was trying to get the Field Trip Toolbox as an add on, and https://in.mathworks.com/matlabcentral/answers/60662-how-do-i-install-fieldtrip-toolbox tells me that installing it from https://www.fieldtriptoolbox.org/ doesn’t go well.
I tried regenerating preferences, as stated in https://www.mathworks.com/matlabcentral/answers/99625-how-do-i-regenerate-my-matlab-preferences, but to no avail. I still get the message:
Error in matab.internal.addons.launchers.showExplorer (line 134)
matlab.internal.addons.Explorer.getInstance.show(navigationData);
Is there no other way than to reinstall the whole package? I was trying to get the Field Trip Toolbox as an add on, and https://in.mathworks.com/matlabcentral/answers/60662-how-do-i-install-fieldtrip-toolbox tells me that installing it from https://www.fieldtriptoolbox.org/ doesn’t go well.
I tried regenerating preferences, as stated in https://www.mathworks.com/matlabcentral/answers/99625-how-do-i-regenerate-my-matlab-preferences, but to no avail. I still get the message:
Error in matab.internal.addons.launchers.showExplorer (line 134)
matlab.internal.addons.Explorer.getInstance.show(navigationData);
Is there no other way than to reinstall the whole package? edf, add-ons MATLAB Answers — New Questions
Surface Area at given hight of an STL file
Hello All,
I have an STL file and I would like to go through it (z-direction) calculating the surface area on the X-Y plane.
I would like to export the data of the layer number and the corrosponding area measured.
My knowlage in matlab is limited so any tips would help.
Thanks!Hello All,
I have an STL file and I would like to go through it (z-direction) calculating the surface area on the X-Y plane.
I would like to export the data of the layer number and the corrosponding area measured.
My knowlage in matlab is limited so any tips would help.
Thanks! Hello All,
I have an STL file and I would like to go through it (z-direction) calculating the surface area on the X-Y plane.
I would like to export the data of the layer number and the corrosponding area measured.
My knowlage in matlab is limited so any tips would help.
Thanks! stl, surface area, 3d object, table, surface, area MATLAB Answers — New Questions
Why do I get “There was an error while extracting product files. Try rerunning the Installer.” when i try to install matlab r2024b ?
Why do I get "There was an error while extracting product files. Try rerunning the Installer." when i try to install matlab r2024b? When i rerun the installer it happens again.
I tried to download the matlab installer again thinking it was some bug, however it continues to happen every time.
My pc is a windows 10, Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz 3.10 GHz, ram 16,0 GB, ssd 240(150 gb free), motherboard asus P8B75-MWhy do I get "There was an error while extracting product files. Try rerunning the Installer." when i try to install matlab r2024b? When i rerun the installer it happens again.
I tried to download the matlab installer again thinking it was some bug, however it continues to happen every time.
My pc is a windows 10, Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz 3.10 GHz, ram 16,0 GB, ssd 240(150 gb free), motherboard asus P8B75-M Why do I get "There was an error while extracting product files. Try rerunning the Installer." when i try to install matlab r2024b? When i rerun the installer it happens again.
I tried to download the matlab installer again thinking it was some bug, however it continues to happen every time.
My pc is a windows 10, Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz 3.10 GHz, ram 16,0 GB, ssd 240(150 gb free), motherboard asus P8B75-M matlab, installation, error MATLAB Answers — New Questions
Working on sagnac-interferometer, HWP(22.5) rotated laser light 45and tilt by mirror to define emergent orthogonal polarized component with frequency component is introduced.
I am working in Sagnac Interferometers. A vertically polarized liight fromaHe–Ne laser is converted into 45 deg linearly polarized light with the help of a half-wave plate (HWP1) oriented at 22.5 deg with respect to the vertical direction and is spatially filtered and collimated after passing through the spatial filter assembly(SF)and lens L.The beam splitter splits the collimated beam with equal intensity into two arms of the interferometer.The beam transmitted by beam splitter passes through atriangular Sagnac interferometer embedded intoa telescope assembly of lenses. The 45 deg polarized beam enters the polarization beam splitter and splits into two counter propagating orthogo nal polarization components in the triangular Sagnac geometry, and the light emits from the beam splitter as angular multi plexed orthogonally polarized components.The mirrors introduce the desired amount of tilt in the emergent orthogonally polarized components Ox and Oy,which can be representedas Ox(r)= exp(iα1r) and Oy(r)= exp(iα2r) ; where α1 andα2 are the frequency coefficients introduced to the orthogonal polarization components due to their off-axis locations in the front focal plane of lens,and r is the transverse spatial coordinate.I am working in Sagnac Interferometers. A vertically polarized liight fromaHe–Ne laser is converted into 45 deg linearly polarized light with the help of a half-wave plate (HWP1) oriented at 22.5 deg with respect to the vertical direction and is spatially filtered and collimated after passing through the spatial filter assembly(SF)and lens L.The beam splitter splits the collimated beam with equal intensity into two arms of the interferometer.The beam transmitted by beam splitter passes through atriangular Sagnac interferometer embedded intoa telescope assembly of lenses. The 45 deg polarized beam enters the polarization beam splitter and splits into two counter propagating orthogo nal polarization components in the triangular Sagnac geometry, and the light emits from the beam splitter as angular multi plexed orthogonally polarized components.The mirrors introduce the desired amount of tilt in the emergent orthogonally polarized components Ox and Oy,which can be representedas Ox(r)= exp(iα1r) and Oy(r)= exp(iα2r) ; where α1 andα2 are the frequency coefficients introduced to the orthogonal polarization components due to their off-axis locations in the front focal plane of lens,and r is the transverse spatial coordinate. I am working in Sagnac Interferometers. A vertically polarized liight fromaHe–Ne laser is converted into 45 deg linearly polarized light with the help of a half-wave plate (HWP1) oriented at 22.5 deg with respect to the vertical direction and is spatially filtered and collimated after passing through the spatial filter assembly(SF)and lens L.The beam splitter splits the collimated beam with equal intensity into two arms of the interferometer.The beam transmitted by beam splitter passes through atriangular Sagnac interferometer embedded intoa telescope assembly of lenses. The 45 deg polarized beam enters the polarization beam splitter and splits into two counter propagating orthogo nal polarization components in the triangular Sagnac geometry, and the light emits from the beam splitter as angular multi plexed orthogonally polarized components.The mirrors introduce the desired amount of tilt in the emergent orthogonally polarized components Ox and Oy,which can be representedas Ox(r)= exp(iα1r) and Oy(r)= exp(iα2r) ; where α1 andα2 are the frequency coefficients introduced to the orthogonal polarization components due to their off-axis locations in the front focal plane of lens,and r is the transverse spatial coordinate. sagnac interferometers, jones matrix MATLAB Answers — New Questions
Translate from English To Arabic
I tried to translate text from English to Arabic using following code:
url = ‘http://ajax.googleapis.com/ajax/services/language/translate’;
page = urlread(url, ‘get’, {‘v’, ‘1.0’,’q’, ‘Hello’, … ‘langpair’, [‘en’ ‘|’ ‘ar’]});
but the result will be
page =
{"responseData": {"translatedText":""}, "responseDetails": null, "responseStatus": 200}
Please help me to solve this problem.I tried to translate text from English to Arabic using following code:
url = ‘http://ajax.googleapis.com/ajax/services/language/translate’;
page = urlread(url, ‘get’, {‘v’, ‘1.0’,’q’, ‘Hello’, … ‘langpair’, [‘en’ ‘|’ ‘ar’]});
but the result will be
page =
{"responseData": {"translatedText":""}, "responseDetails": null, "responseStatus": 200}
Please help me to solve this problem. I tried to translate text from English to Arabic using following code:
url = ‘http://ajax.googleapis.com/ajax/services/language/translate’;
page = urlread(url, ‘get’, {‘v’, ‘1.0’,’q’, ‘Hello’, … ‘langpair’, [‘en’ ‘|’ ‘ar’]});
but the result will be
page =
{"responseData": {"translatedText":""}, "responseDetails": null, "responseStatus": 200}
Please help me to solve this problem. translate arabic, arabic MATLAB Answers — New Questions