Author: PuTI
reconstruction Error of 2 colored images
I have an original image of dimension 300x300x3 (RGB)
after removing some entries, I apply an algorithm to reconstuct the original image.
Now i want to find the relative error between the 2 images.
….
% I call my function norm_fro to calcuate the error
Erec(i)= norm_fro( X_origin , X_r ecovered);
….
% here is my norm_fro function
function f = norm_fro( X , Xhat )
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2;
end
I get this error
Error using norm
Input must be 2-D.
Error in norm_fro (line 11)
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2;I have an original image of dimension 300x300x3 (RGB)
after removing some entries, I apply an algorithm to reconstuct the original image.
Now i want to find the relative error between the 2 images.
….
% I call my function norm_fro to calcuate the error
Erec(i)= norm_fro( X_origin , X_r ecovered);
….
% here is my norm_fro function
function f = norm_fro( X , Xhat )
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2;
end
I get this error
Error using norm
Input must be 2-D.
Error in norm_fro (line 11)
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2; I have an original image of dimension 300x300x3 (RGB)
after removing some entries, I apply an algorithm to reconstuct the original image.
Now i want to find the relative error between the 2 images.
….
% I call my function norm_fro to calcuate the error
Erec(i)= norm_fro( X_origin , X_r ecovered);
….
% here is my norm_fro function
function f = norm_fro( X , Xhat )
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2;
end
I get this error
Error using norm
Input must be 2-D.
Error in norm_fro (line 11)
f = norm(X -Xhat,’fro’)^2/norm(X,’fro’)^2; error, image processing, image analysis MATLAB Answers — New Questions
problems with openProject(‘asbQuadcopter’);
hi.
i used to work with asbQuadcopter project in my lessons. This year it looks like there is a new version
i command openExample(‘aeroblks_quad/QuadcopterProjectExample’) and i get the files in /MATLAB Drive/Examples/R2024b/aeroblks_quad/QuadcopterProjectExample/asbQuadcopter’
2. i start the project with openProject(‘asbQuadcopter’) and i get the main simulink project window
3. i run the simulink and i get this error:
Error evaluating ‘InitFcn’ callback of To Video Display block (mask) ‘asbQuadcopter/Sensors/Camera Model/Camera (Airport)/To Video Display’.
Callback string is ‘import matlab.internal.capability.Capability
Capability.require(Capability.LocalClient)
‘
Caused by:
This functionality is not available on remote platforms.
Component:Simulink | Category:Block error
I looks like this 2025 year, this version can not work on remote platforms.
What can i do with 2024 and 2023 versions of asbQuadcopter in my lessons?
Best regardshi.
i used to work with asbQuadcopter project in my lessons. This year it looks like there is a new version
i command openExample(‘aeroblks_quad/QuadcopterProjectExample’) and i get the files in /MATLAB Drive/Examples/R2024b/aeroblks_quad/QuadcopterProjectExample/asbQuadcopter’
2. i start the project with openProject(‘asbQuadcopter’) and i get the main simulink project window
3. i run the simulink and i get this error:
Error evaluating ‘InitFcn’ callback of To Video Display block (mask) ‘asbQuadcopter/Sensors/Camera Model/Camera (Airport)/To Video Display’.
Callback string is ‘import matlab.internal.capability.Capability
Capability.require(Capability.LocalClient)
‘
Caused by:
This functionality is not available on remote platforms.
Component:Simulink | Category:Block error
I looks like this 2025 year, this version can not work on remote platforms.
What can i do with 2024 and 2023 versions of asbQuadcopter in my lessons?
Best regards hi.
i used to work with asbQuadcopter project in my lessons. This year it looks like there is a new version
i command openExample(‘aeroblks_quad/QuadcopterProjectExample’) and i get the files in /MATLAB Drive/Examples/R2024b/aeroblks_quad/QuadcopterProjectExample/asbQuadcopter’
2. i start the project with openProject(‘asbQuadcopter’) and i get the main simulink project window
3. i run the simulink and i get this error:
Error evaluating ‘InitFcn’ callback of To Video Display block (mask) ‘asbQuadcopter/Sensors/Camera Model/Camera (Airport)/To Video Display’.
Callback string is ‘import matlab.internal.capability.Capability
Capability.require(Capability.LocalClient)
‘
Caused by:
This functionality is not available on remote platforms.
Component:Simulink | Category:Block error
I looks like this 2025 year, this version can not work on remote platforms.
What can i do with 2024 and 2023 versions of asbQuadcopter in my lessons?
Best regards asbquadcopter MATLAB Answers — New Questions
How can I find the values through the excel field that I imported to matlab?
Hello all,
While I was doing my homework I have stucked at here. I have imported an excel file into matlab and the excel file consist of values such as Gender,Age,Weight,Smoking Status and Average Blood Pressure. I need to define these following two questions but I cant find out how to put it in a matlab function. Questions are,
1- What is the blood pressure of a 45-year-old, 75 kg male smoking cigarette?
2- What is the blood pressure of a 38-year-old non-smoker woman weighing 60 kg?
Any help is appreciated,Hello all,
While I was doing my homework I have stucked at here. I have imported an excel file into matlab and the excel file consist of values such as Gender,Age,Weight,Smoking Status and Average Blood Pressure. I need to define these following two questions but I cant find out how to put it in a matlab function. Questions are,
1- What is the blood pressure of a 45-year-old, 75 kg male smoking cigarette?
2- What is the blood pressure of a 38-year-old non-smoker woman weighing 60 kg?
Any help is appreciated, Hello all,
While I was doing my homework I have stucked at here. I have imported an excel file into matlab and the excel file consist of values such as Gender,Age,Weight,Smoking Status and Average Blood Pressure. I need to define these following two questions but I cant find out how to put it in a matlab function. Questions are,
1- What is the blood pressure of a 45-year-old, 75 kg male smoking cigarette?
2- What is the blood pressure of a 38-year-old non-smoker woman weighing 60 kg?
Any help is appreciated, importing excel data, blood pressure, smoking MATLAB Answers — New Questions
In Vehicle Body 3dof Longitudinal, how to determine suspension parameter?
What is the meaning of arrangement of FxkF, dzsF, FsbF, dzdotsF?What is the meaning of arrangement of FxkF, dzsF, FsbF, dzdotsF? What is the meaning of arrangement of FxkF, dzsF, FsbF, dzdotsF? suspension, vehicle body 3dof longitudinal MATLAB Answers — New Questions
Possible to prematurely stop single workers in a parsim simulation
I am running a parsim simulation for a simulink model in R2023B. Here, I experience single workers getting stuck in the simulation, during compilation or in a ‘queued’ state, some of these later aborting the simulation.
For exploratory simulation, it is not necessary for my simulation run to have every simulation successfully run, I can tolerate a few fails for overall speed gain.
So, my idea would be to set a timeout for each simulation and prematurely stop the simulation, ideally with a timeout error for later processing, if the overall worker occupation of a single run exceeds a set time. This should include queueing and compilation.
I have found this related article on stopping the whole pool using a postSimFunction, and plan to use this to evaluate the run time of each other worker after one simulation has finished, stopping these that take too long.
However, I fail to measure single worker duration and aborting a single simulation on a worker from this postSimfunction. Are there any good ways on how to do that?
If that cannot be done, is it possible to place some form or real-time clock in a simulink simulation to detect simulation duration and finish the simulation based on that criterion?
Thank you for your help.I am running a parsim simulation for a simulink model in R2023B. Here, I experience single workers getting stuck in the simulation, during compilation or in a ‘queued’ state, some of these later aborting the simulation.
For exploratory simulation, it is not necessary for my simulation run to have every simulation successfully run, I can tolerate a few fails for overall speed gain.
So, my idea would be to set a timeout for each simulation and prematurely stop the simulation, ideally with a timeout error for later processing, if the overall worker occupation of a single run exceeds a set time. This should include queueing and compilation.
I have found this related article on stopping the whole pool using a postSimFunction, and plan to use this to evaluate the run time of each other worker after one simulation has finished, stopping these that take too long.
However, I fail to measure single worker duration and aborting a single simulation on a worker from this postSimfunction. Are there any good ways on how to do that?
If that cannot be done, is it possible to place some form or real-time clock in a simulink simulation to detect simulation duration and finish the simulation based on that criterion?
Thank you for your help. I am running a parsim simulation for a simulink model in R2023B. Here, I experience single workers getting stuck in the simulation, during compilation or in a ‘queued’ state, some of these later aborting the simulation.
For exploratory simulation, it is not necessary for my simulation run to have every simulation successfully run, I can tolerate a few fails for overall speed gain.
So, my idea would be to set a timeout for each simulation and prematurely stop the simulation, ideally with a timeout error for later processing, if the overall worker occupation of a single run exceeds a set time. This should include queueing and compilation.
I have found this related article on stopping the whole pool using a postSimFunction, and plan to use this to evaluate the run time of each other worker after one simulation has finished, stopping these that take too long.
However, I fail to measure single worker duration and aborting a single simulation on a worker from this postSimfunction. Are there any good ways on how to do that?
If that cannot be done, is it possible to place some form or real-time clock in a simulink simulation to detect simulation duration and finish the simulation based on that criterion?
Thank you for your help. parallel computing, simulation control MATLAB Answers — New Questions
How can I display a figure in the entrire screen of a second monitor without toolbars/whitespace/greyspace around it?
I am trying to project various different sine waves onto a scene using a projector in order to obtain depth information. My current method involves a projector currently acting as my second monitor connected through display port. I’m then trying to fit a figure of the sinewaves to the monitor such that there is nothing around the edges, just the sinewave pattern. The code I have been trying is this:
time = 1:0.001:2;
frequency = 60;
phase = 90;
phase_in_rad = degtorad(phase); %Ignore these for the time being
y=0.5*cos((2*pi*frequency*time)+(2*pi/3));
plot(time,y);
print(‘SineWaveImage’,’-djpeg’);
fig1 = figure;
imshow(imread(‘SineWaveImage.jpg’));
pos_fig1 = [0 0 1900 2000];
set(fig1,’Position’,pos_fig1,’ToolBar’,’none’,’MenuBar’,’none’)
I have been attempting to change pos_fig1 so that the projector projects only the sinewaves and no grey/white space. I’ve also tried a function that cuts a lot of the white space successfully, but still suffers from the grey space when it is put back into a figure.
Is there a better way of writing this code, or any other methods of achieving this? Thanks for any helpI am trying to project various different sine waves onto a scene using a projector in order to obtain depth information. My current method involves a projector currently acting as my second monitor connected through display port. I’m then trying to fit a figure of the sinewaves to the monitor such that there is nothing around the edges, just the sinewave pattern. The code I have been trying is this:
time = 1:0.001:2;
frequency = 60;
phase = 90;
phase_in_rad = degtorad(phase); %Ignore these for the time being
y=0.5*cos((2*pi*frequency*time)+(2*pi/3));
plot(time,y);
print(‘SineWaveImage’,’-djpeg’);
fig1 = figure;
imshow(imread(‘SineWaveImage.jpg’));
pos_fig1 = [0 0 1900 2000];
set(fig1,’Position’,pos_fig1,’ToolBar’,’none’,’MenuBar’,’none’)
I have been attempting to change pos_fig1 so that the projector projects only the sinewaves and no grey/white space. I’ve also tried a function that cuts a lot of the white space successfully, but still suffers from the grey space when it is put back into a figure.
Is there a better way of writing this code, or any other methods of achieving this? Thanks for any help I am trying to project various different sine waves onto a scene using a projector in order to obtain depth information. My current method involves a projector currently acting as my second monitor connected through display port. I’m then trying to fit a figure of the sinewaves to the monitor such that there is nothing around the edges, just the sinewave pattern. The code I have been trying is this:
time = 1:0.001:2;
frequency = 60;
phase = 90;
phase_in_rad = degtorad(phase); %Ignore these for the time being
y=0.5*cos((2*pi*frequency*time)+(2*pi/3));
plot(time,y);
print(‘SineWaveImage’,’-djpeg’);
fig1 = figure;
imshow(imread(‘SineWaveImage.jpg’));
pos_fig1 = [0 0 1900 2000];
set(fig1,’Position’,pos_fig1,’ToolBar’,’none’,’MenuBar’,’none’)
I have been attempting to change pos_fig1 so that the projector projects only the sinewaves and no grey/white space. I’ve also tried a function that cuts a lot of the white space successfully, but still suffers from the grey space when it is put back into a figure.
Is there a better way of writing this code, or any other methods of achieving this? Thanks for any help digital image processing, signal processing MATLAB Answers — New Questions
Unable to attach add_exec_event_listener to a block when using Simulink Compiler
I am trying to get real-time data from simulink model (rtl-sdr receiver) and display it on gui, so I am using `add_exec_event_listener` in Simulink model callback as written here: https://www.mathworks.com/matlabcentral/answers/446302-how-do-i-update-a-gui-designed-in-app-designer-with-data-from-a-running-simulink-model
Interaction with model based on Simulink Compiler functions, e.g. creation a SimulationInput object and simulink.compiler.configureForDeployment.
The problem is that I get an error when the line below is executed:
out=sim(in)
Full text of an error:
Error evaluating ‘StartFcn’ callback of block_diagram ‘gsmAdGui2’.
Callback string is ‘blk = ‘gsmAdGui2/Gain’;
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener);
Caused by:
Error using Simulink.Simulation.internal.DesktopSimHelper
Adding a listener for a block method execution event for ‘gsmAdGui2/Gain’ is not supported. Listeners can be added only when block diagram is executing.
I don’t understand what should I do to correctly attach the listener to a gain block (because it cannot be attached directly to a rtl-sdr). Thank for any help.
Here is main callback function:
function StartButtonPushed(app, event)
app.StartButton.Enable = ‘off’;
app.StopButton.Enable = ‘on’;
app.SamplingRate=app.SampRateEditField.Value;
%Create a SimulationInput object for this model
in=Simulink.SimulationInput(app.modelName);
in=in.setModelParameter(‘StartTime’,’0.01′,’StopTime’, num2str(app.StopTimeEditField.Value));
in = in.setVariable(‘sdrGain’, app.GainEditField.Value);
in = in.setVariable(‘fc’, app.CenterFreqEditField.Value);
in = in.setVariable(‘sampRate’, app.SamplingRate);
in.applyToModel;
in=simulink.compiler.configureForDeployment(in);
out=sim(in);%запуск симуляции
app.StartButton.Enable = ‘on’;
app.StopButton.Enable = ‘off’;
end
Here is updateGUI function that receives real-time data from model:
function updateGUI(app, varargin) %plots fft of received 2048 samples per frame iq stream
% Create an object that gets the run-time value of the specified block
rto = get_param([bdroot,’/Gain’],’RuntimeObject’);
% Update the GUI accordingly
currentTime = rto.CurrentTime;
app.SimTime.Text = num2str(currentTime);
sdrData = rto.InputPort(1).Data;
sdrData=sdrData.*app.W; % hamming window
sdrFft = fftshift(fft(sdrData));
sdrFft=20*log10((abs(sdrFft))/2048);
plot(app.UIAxes, app.freqvec, sdrFft,’b’);
end
Here is model InitFcn: hApp = sdrAdGui8 %name of an app
Here is model StartFcn:
blk = ‘gsmAdGui2/Gain’; %block to listen
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener);I am trying to get real-time data from simulink model (rtl-sdr receiver) and display it on gui, so I am using `add_exec_event_listener` in Simulink model callback as written here: https://www.mathworks.com/matlabcentral/answers/446302-how-do-i-update-a-gui-designed-in-app-designer-with-data-from-a-running-simulink-model
Interaction with model based on Simulink Compiler functions, e.g. creation a SimulationInput object and simulink.compiler.configureForDeployment.
The problem is that I get an error when the line below is executed:
out=sim(in)
Full text of an error:
Error evaluating ‘StartFcn’ callback of block_diagram ‘gsmAdGui2’.
Callback string is ‘blk = ‘gsmAdGui2/Gain’;
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener);
Caused by:
Error using Simulink.Simulation.internal.DesktopSimHelper
Adding a listener for a block method execution event for ‘gsmAdGui2/Gain’ is not supported. Listeners can be added only when block diagram is executing.
I don’t understand what should I do to correctly attach the listener to a gain block (because it cannot be attached directly to a rtl-sdr). Thank for any help.
Here is main callback function:
function StartButtonPushed(app, event)
app.StartButton.Enable = ‘off’;
app.StopButton.Enable = ‘on’;
app.SamplingRate=app.SampRateEditField.Value;
%Create a SimulationInput object for this model
in=Simulink.SimulationInput(app.modelName);
in=in.setModelParameter(‘StartTime’,’0.01′,’StopTime’, num2str(app.StopTimeEditField.Value));
in = in.setVariable(‘sdrGain’, app.GainEditField.Value);
in = in.setVariable(‘fc’, app.CenterFreqEditField.Value);
in = in.setVariable(‘sampRate’, app.SamplingRate);
in.applyToModel;
in=simulink.compiler.configureForDeployment(in);
out=sim(in);%запуск симуляции
app.StartButton.Enable = ‘on’;
app.StopButton.Enable = ‘off’;
end
Here is updateGUI function that receives real-time data from model:
function updateGUI(app, varargin) %plots fft of received 2048 samples per frame iq stream
% Create an object that gets the run-time value of the specified block
rto = get_param([bdroot,’/Gain’],’RuntimeObject’);
% Update the GUI accordingly
currentTime = rto.CurrentTime;
app.SimTime.Text = num2str(currentTime);
sdrData = rto.InputPort(1).Data;
sdrData=sdrData.*app.W; % hamming window
sdrFft = fftshift(fft(sdrData));
sdrFft=20*log10((abs(sdrFft))/2048);
plot(app.UIAxes, app.freqvec, sdrFft,’b’);
end
Here is model InitFcn: hApp = sdrAdGui8 %name of an app
Here is model StartFcn:
blk = ‘gsmAdGui2/Gain’; %block to listen
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener); I am trying to get real-time data from simulink model (rtl-sdr receiver) and display it on gui, so I am using `add_exec_event_listener` in Simulink model callback as written here: https://www.mathworks.com/matlabcentral/answers/446302-how-do-i-update-a-gui-designed-in-app-designer-with-data-from-a-running-simulink-model
Interaction with model based on Simulink Compiler functions, e.g. creation a SimulationInput object and simulink.compiler.configureForDeployment.
The problem is that I get an error when the line below is executed:
out=sim(in)
Full text of an error:
Error evaluating ‘StartFcn’ callback of block_diagram ‘gsmAdGui2’.
Callback string is ‘blk = ‘gsmAdGui2/Gain’;
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener);
Caused by:
Error using Simulink.Simulation.internal.DesktopSimHelper
Adding a listener for a block method execution event for ‘gsmAdGui2/Gain’ is not supported. Listeners can be added only when block diagram is executing.
I don’t understand what should I do to correctly attach the listener to a gain block (because it cannot be attached directly to a rtl-sdr). Thank for any help.
Here is main callback function:
function StartButtonPushed(app, event)
app.StartButton.Enable = ‘off’;
app.StopButton.Enable = ‘on’;
app.SamplingRate=app.SampRateEditField.Value;
%Create a SimulationInput object for this model
in=Simulink.SimulationInput(app.modelName);
in=in.setModelParameter(‘StartTime’,’0.01′,’StopTime’, num2str(app.StopTimeEditField.Value));
in = in.setVariable(‘sdrGain’, app.GainEditField.Value);
in = in.setVariable(‘fc’, app.CenterFreqEditField.Value);
in = in.setVariable(‘sampRate’, app.SamplingRate);
in.applyToModel;
in=simulink.compiler.configureForDeployment(in);
out=sim(in);%запуск симуляции
app.StartButton.Enable = ‘on’;
app.StopButton.Enable = ‘off’;
end
Here is updateGUI function that receives real-time data from model:
function updateGUI(app, varargin) %plots fft of received 2048 samples per frame iq stream
% Create an object that gets the run-time value of the specified block
rto = get_param([bdroot,’/Gain’],’RuntimeObject’);
% Update the GUI accordingly
currentTime = rto.CurrentTime;
app.SimTime.Text = num2str(currentTime);
sdrData = rto.InputPort(1).Data;
sdrData=sdrData.*app.W; % hamming window
sdrFft = fftshift(fft(sdrData));
sdrFft=20*log10((abs(sdrFft))/2048);
plot(app.UIAxes, app.freqvec, sdrFft,’b’);
end
Here is model InitFcn: hApp = sdrAdGui8 %name of an app
Here is model StartFcn:
blk = ‘gsmAdGui2/Gain’; %block to listen
event = ‘PostOutputs’;
listener = @(app, event) updateGUI(hApp);
h = add_exec_event_listener(blk, event, listener); app designer, gui, event listener, simulink compiler MATLAB Answers — New Questions
Model configuration GUI is not opening in Matlab 2024b
Hi,
I am trying to open Model setting but it gives below errors.Hi,
I am trying to open Model setting but it gives below errors. Hi,
I am trying to open Model setting but it gives below errors. model settings MATLAB Answers — New Questions
How to create a data structure
Hallo Everyone,
I needed a help in creating a data structure. I am new to this platform. it would be helpful if someones guides me through giving information or an example. I have a set of data’s in an excel sheet. I need to create a data structure of it. I have set of turbines(1-5) each are having its own respective towers(1-10) having some field names. If i need to add a field name in any of my tower it should update the turbine too. How can i create a data structure for it. Thank you.
Its in the form of tree.Hallo Everyone,
I needed a help in creating a data structure. I am new to this platform. it would be helpful if someones guides me through giving information or an example. I have a set of data’s in an excel sheet. I need to create a data structure of it. I have set of turbines(1-5) each are having its own respective towers(1-10) having some field names. If i need to add a field name in any of my tower it should update the turbine too. How can i create a data structure for it. Thank you.
Its in the form of tree. Hallo Everyone,
I needed a help in creating a data structure. I am new to this platform. it would be helpful if someones guides me through giving information or an example. I have a set of data’s in an excel sheet. I need to create a data structure of it. I have set of turbines(1-5) each are having its own respective towers(1-10) having some field names. If i need to add a field name in any of my tower it should update the turbine too. How can i create a data structure for it. Thank you.
Its in the form of tree. data structure, structures MATLAB Answers — New Questions
image steganography using DCT
I want to hide image under cover image using DCT. But while doing quantization step, most of dct coefficients of cover image become zero . So should i avoid quantization step during image steganography or choose a cover image of much larger size to embed each bit, what is correct method to hide image under cover image using DCT?I want to hide image under cover image using DCT. But while doing quantization step, most of dct coefficients of cover image become zero . So should i avoid quantization step during image steganography or choose a cover image of much larger size to embed each bit, what is correct method to hide image under cover image using DCT? I want to hide image under cover image using DCT. But while doing quantization step, most of dct coefficients of cover image become zero . So should i avoid quantization step during image steganography or choose a cover image of much larger size to embed each bit, what is correct method to hide image under cover image using DCT? steganography, dct, quantization, image processing MATLAB Answers — New Questions
Is it possible to download the Projects at the end of Self-Paced Courses?
As a university student, I was wondering if it was possible to download the Projects at the end of every Self-Paced Course, or if they are only available online during the Courses. I hope this is not a silly question, and thank you to anyone who responds.As a university student, I was wondering if it was possible to download the Projects at the end of every Self-Paced Course, or if they are only available online during the Courses. I hope this is not a silly question, and thank you to anyone who responds. As a university student, I was wondering if it was possible to download the Projects at the end of every Self-Paced Course, or if they are only available online during the Courses. I hope this is not a silly question, and thank you to anyone who responds. courses, download, self-paced, projects, online, online_training, distance_learning MATLAB Answers — New Questions
Why does j1939ParameterGroupTimetable() run out of memory?
Hi,
I try to convert a large blf file into a .mat file. With small blf files it works fine, but with large files the function j1939ParameterGroupTimetable() runs "Out of memory". See my code below:
blf_data = blfread(blf_file_path, can_channel);
dbc_file = canDatabase(dbc_path);
j1939PGTimetable = j1939ParameterGroupTimetable(blf_data, dbc_file);
I tried to fix this with tall(), but j1939ParameterGroupTimetable() "does not support tall arrays."
How can I solve this?Hi,
I try to convert a large blf file into a .mat file. With small blf files it works fine, but with large files the function j1939ParameterGroupTimetable() runs "Out of memory". See my code below:
blf_data = blfread(blf_file_path, can_channel);
dbc_file = canDatabase(dbc_path);
j1939PGTimetable = j1939ParameterGroupTimetable(blf_data, dbc_file);
I tried to fix this with tall(), but j1939ParameterGroupTimetable() "does not support tall arrays."
How can I solve this? Hi,
I try to convert a large blf file into a .mat file. With small blf files it works fine, but with large files the function j1939ParameterGroupTimetable() runs "Out of memory". See my code below:
blf_data = blfread(blf_file_path, can_channel);
dbc_file = canDatabase(dbc_path);
j1939PGTimetable = j1939ParameterGroupTimetable(blf_data, dbc_file);
I tried to fix this with tall(), but j1939ParameterGroupTimetable() "does not support tall arrays."
How can I solve this? can, blf file, data conversion MATLAB Answers — New Questions
Finding energy from co-occurrence matrix
I am trying to find energy of an image using co occurrence matrix. Is this code correct? Is the method of calculating gray level co occurrence matrix correct?
offsets = [ 0 1; -1 1; -1 0; -1 -1];
T(i).energy = 0; %initial energy of image (T(i)) is 0
Imag = T(i).data; %Reading image into Imag
glcm = graycomatrix(Imag,’Of’,offsets); %calculating gray level co-occurrence matrix
glcm
[r c] = size(glcm);
for ctr=1:1:r
for ctr2=1:1:c
T(i).energy = T(i).energy+(glcm(ctr,ctr)).^2;
end
end
fprintf(‘energy is %linn’,T(i).energy);I am trying to find energy of an image using co occurrence matrix. Is this code correct? Is the method of calculating gray level co occurrence matrix correct?
offsets = [ 0 1; -1 1; -1 0; -1 -1];
T(i).energy = 0; %initial energy of image (T(i)) is 0
Imag = T(i).data; %Reading image into Imag
glcm = graycomatrix(Imag,’Of’,offsets); %calculating gray level co-occurrence matrix
glcm
[r c] = size(glcm);
for ctr=1:1:r
for ctr2=1:1:c
T(i).energy = T(i).energy+(glcm(ctr,ctr)).^2;
end
end
fprintf(‘energy is %linn’,T(i).energy); I am trying to find energy of an image using co occurrence matrix. Is this code correct? Is the method of calculating gray level co occurrence matrix correct?
offsets = [ 0 1; -1 1; -1 0; -1 -1];
T(i).energy = 0; %initial energy of image (T(i)) is 0
Imag = T(i).data; %Reading image into Imag
glcm = graycomatrix(Imag,’Of’,offsets); %calculating gray level co-occurrence matrix
glcm
[r c] = size(glcm);
for ctr=1:1:r
for ctr2=1:1:c
T(i).energy = T(i).energy+(glcm(ctr,ctr)).^2;
end
end
fprintf(‘energy is %linn’,T(i).energy); regards MATLAB Answers — New Questions
How can I solve the problem about “input 2 expects a value in range [-3 3]”with fuzzy logic controller?
I used the fuzzy logic controller with 2 inputs.But there are many warnings about its range.
Please see the pictures.
I also used the Saturation to limit the value……
A more incomprehensible question was that after changing the setting "out of range input value" from "warning" to "error" ,No error occurred!!
Please help me to solve these problems.
Thank you for your reply!I used the fuzzy logic controller with 2 inputs.But there are many warnings about its range.
Please see the pictures.
I also used the Saturation to limit the value……
A more incomprehensible question was that after changing the setting "out of range input value" from "warning" to "error" ,No error occurred!!
Please help me to solve these problems.
Thank you for your reply! I used the fuzzy logic controller with 2 inputs.But there are many warnings about its range.
Please see the pictures.
I also used the Saturation to limit the value……
A more incomprehensible question was that after changing the setting "out of range input value" from "warning" to "error" ,No error occurred!!
Please help me to solve these problems.
Thank you for your reply! simulink, fuzzy MATLAB Answers — New Questions
How to import large data file in function in matlab?
I have a satellite data values stored in a .dat file of almost 900 MB. The data is in the form of int8. I want to read as much data as possible from the start and then pass it in a function argument and then save the new signal in a separate file. I have used importdata but it cant work and unable to read large data file. Is there any other way which I can use to read data in chunks and put them together afterwards? Anyone please help me out. Its very important that I read this data.
The specifications of software, platform & PC are:
Matlab R2015a. Windows 7 64-bit, Core i5 1st Gen., 4 GB RAM, 250 of hard Disk SpaceI have a satellite data values stored in a .dat file of almost 900 MB. The data is in the form of int8. I want to read as much data as possible from the start and then pass it in a function argument and then save the new signal in a separate file. I have used importdata but it cant work and unable to read large data file. Is there any other way which I can use to read data in chunks and put them together afterwards? Anyone please help me out. Its very important that I read this data.
The specifications of software, platform & PC are:
Matlab R2015a. Windows 7 64-bit, Core i5 1st Gen., 4 GB RAM, 250 of hard Disk Space I have a satellite data values stored in a .dat file of almost 900 MB. The data is in the form of int8. I want to read as much data as possible from the start and then pass it in a function argument and then save the new signal in a separate file. I have used importdata but it cant work and unable to read large data file. Is there any other way which I can use to read data in chunks and put them together afterwards? Anyone please help me out. Its very important that I read this data.
The specifications of software, platform & PC are:
Matlab R2015a. Windows 7 64-bit, Core i5 1st Gen., 4 GB RAM, 250 of hard Disk Space large data, import data file, .dat MATLAB Answers — New Questions
Im trying to plot the impulse and step responses and frequency response (magnitude and phase) of this system directly from the differential equation.
xt = e^-3t
ht= -5e^-2t +6e^-3t
so ofcourse these would be used to plot yt which is xt*ht in other words xt conv ht. Thanks for your assistance!!xt = e^-3t
ht= -5e^-2t +6e^-3t
so ofcourse these would be used to plot yt which is xt*ht in other words xt conv ht. Thanks for your assistance!! xt = e^-3t
ht= -5e^-2t +6e^-3t
so ofcourse these would be used to plot yt which is xt*ht in other words xt conv ht. Thanks for your assistance!! plot, differential equation MATLAB Answers — New Questions
Create an environment for reinforcement learning agent using MATLAB
I want to create an environment for an agent using vehicular network or route based. How can i create ?I want to create an environment for an agent using vehicular network or route based. How can i create ? I want to create an environment for an agent using vehicular network or route based. How can i create ? matlab, vehicular network, route MATLAB Answers — New Questions
use pca to perform bss
anybody please give me a refernce or any matlab code to use pca to perform bssanybody please give me a refernce or any matlab code to use pca to perform bss anybody please give me a refernce or any matlab code to use pca to perform bss blind source separation, bss, pca MATLAB Answers — New Questions
license manager error-8
after installing matlab 2016a , it display license manager error -8error -8 .so would you help meafter installing matlab 2016a , it display license manager error -8error -8 .so would you help me after installing matlab 2016a , it display license manager error -8error -8 .so would you help me error -8 MATLAB Answers — New Questions
psat :User Defined Models (UDMs)
I am using User Defined Models (UDMs) in PSAT to create a new type component . In order to deepen the understanding, I used PSAT examples for modeling. When I click on ‘build’ button,it displays:
Failed to initialize symbolic preferences.
> In syms (line 195)
In fm_build (line 96)
In fm_comp (line 66)
Cannot rewrite file "fm_ncomp.m". Check file permissions and content.
Did anyone know the reason and could please help me?I am using User Defined Models (UDMs) in PSAT to create a new type component . In order to deepen the understanding, I used PSAT examples for modeling. When I click on ‘build’ button,it displays:
Failed to initialize symbolic preferences.
> In syms (line 195)
In fm_build (line 96)
In fm_comp (line 66)
Cannot rewrite file "fm_ncomp.m". Check file permissions and content.
Did anyone know the reason and could please help me? I am using User Defined Models (UDMs) in PSAT to create a new type component . In order to deepen the understanding, I used PSAT examples for modeling. When I click on ‘build’ button,it displays:
Failed to initialize symbolic preferences.
> In syms (line 195)
In fm_build (line 96)
In fm_comp (line 66)
Cannot rewrite file "fm_ncomp.m". Check file permissions and content.
Did anyone know the reason and could please help me? psat, power, analysis, toolbox, fm_ncomp.m, power system analysis toolbox MATLAB Answers — New Questions