Tag Archives: matlab
Webread Query Not Working
I am looking to query a forum style page (this forum, actually), but cannot seem to the the queries working as desired.
My goal is to essentially get the most viewed questions about Simulink (as woud be done via this page: https://www.mathworks.com/matlabcentral/answers/?product_base_code%5B%5D=Simulink&sort=views+desc)
However, when I try this via webread, the page I get is just the base Answers page, and it isn’t giving me Simulink, nor the sorting.
I am using the following (where indexed will be looped for multiple pages):
url = ‘https://www.mathworks.com/matlabcentral/answers/’;
data = webread(url,’page’, index,’product_base_code%5B%5D’,’Simulink’,’sort’,’views+desc’);
Any advice/help would be greatly appreciated.
Thanks!I am looking to query a forum style page (this forum, actually), but cannot seem to the the queries working as desired.
My goal is to essentially get the most viewed questions about Simulink (as woud be done via this page: https://www.mathworks.com/matlabcentral/answers/?product_base_code%5B%5D=Simulink&sort=views+desc)
However, when I try this via webread, the page I get is just the base Answers page, and it isn’t giving me Simulink, nor the sorting.
I am using the following (where indexed will be looped for multiple pages):
url = ‘https://www.mathworks.com/matlabcentral/answers/’;
data = webread(url,’page’, index,’product_base_code%5B%5D’,’Simulink’,’sort’,’views+desc’);
Any advice/help would be greatly appreciated.
Thanks! I am looking to query a forum style page (this forum, actually), but cannot seem to the the queries working as desired.
My goal is to essentially get the most viewed questions about Simulink (as woud be done via this page: https://www.mathworks.com/matlabcentral/answers/?product_base_code%5B%5D=Simulink&sort=views+desc)
However, when I try this via webread, the page I get is just the base Answers page, and it isn’t giving me Simulink, nor the sorting.
I am using the following (where indexed will be looped for multiple pages):
url = ‘https://www.mathworks.com/matlabcentral/answers/’;
data = webread(url,’page’, index,’product_base_code%5B%5D’,’Simulink’,’sort’,’views+desc’);
Any advice/help would be greatly appreciated.
Thanks! webread MATLAB Answers — New Questions
How to evaluate a fistree designed with the new addition to the app?
Hello,
How can I import and evaluate a fistree designed in the new addition of the FuzzyLogic Toolbox app?
It is saved as .mat file instead of .fis.
Readfis and load do not seem to work to import it to my script. I want to give inputs via evalfis, but it does not seem to work with the .mat file. It seems that it is not recognized as fistree.
Many thanks in advanceHello,
How can I import and evaluate a fistree designed in the new addition of the FuzzyLogic Toolbox app?
It is saved as .mat file instead of .fis.
Readfis and load do not seem to work to import it to my script. I want to give inputs via evalfis, but it does not seem to work with the .mat file. It seems that it is not recognized as fistree.
Many thanks in advance Hello,
How can I import and evaluate a fistree designed in the new addition of the FuzzyLogic Toolbox app?
It is saved as .mat file instead of .fis.
Readfis and load do not seem to work to import it to my script. I want to give inputs via evalfis, but it does not seem to work with the .mat file. It seems that it is not recognized as fistree.
Many thanks in advance fuzzy logic, fuzzy logic toolbox, fistree, evalfis, readfis MATLAB Answers — New Questions
Cannot save model:Error An error occurred during a callback while saving ‘D:untitled.slx’.
I am unable to save the model, which occasionally occurs. Does anyone know why?
An error occurred during a callback while saving ‘D:untitled.slx’.
The previously saved version of this file (if any) has not
been changed.
****
ErrorI am unable to save the model, which occasionally occurs. Does anyone know why?
An error occurred during a callback while saving ‘D:untitled.slx’.
The previously saved version of this file (if any) has not
been changed.
****
Error I am unable to save the model, which occasionally occurs. Does anyone know why?
An error occurred during a callback while saving ‘D:untitled.slx’.
The previously saved version of this file (if any) has not
been changed.
****
Error simulink MATLAB Answers — New Questions
InsstallMathWorksServiceHost: error while loading sharedl libraries
Running MATLAB 2024a on Ubuntu24.04 with concurrent network license. Insttallation diretory is local and owned by root. Home directory is NFS v3 mount.
When starting MATLAB the following messages appear in the console. MATLAB appears to function okay.
/home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: error while loading shared libraries: /home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: file too shortRunning MATLAB 2024a on Ubuntu24.04 with concurrent network license. Insttallation diretory is local and owned by root. Home directory is NFS v3 mount.
When starting MATLAB the following messages appear in the console. MATLAB appears to function okay.
/home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: error while loading shared libraries: /home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: file too short Running MATLAB 2024a on Ubuntu24.04 with concurrent network license. Insttallation diretory is local and owned by root. Home directory is NFS v3 mount.
When starting MATLAB the following messages appear in the console. MATLAB appears to function okay.
/home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: error while loading shared libraries: /home/nmrbox/gweatherby/.MathWorks/ServiceHost/matlab1/_tmp_MSHI_d1af-ba0c-9c00-df21/mci/_tempinstaller_glnxa64/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: file too short installation, servciehost MATLAB Answers — New Questions
Comparison of excel sheet data and output should be excel sheet for matched and mismatched data using simulink model.
I have two excel sheets, Data1 and Data2. I need to compare both the excel sheet and atlast I need to get excel sheet as an output for matched data and mismatched data using simulink model. Tell me how to read the excel sheet, compare it and and how to get the excel sheet as an output?I have two excel sheets, Data1 and Data2. I need to compare both the excel sheet and atlast I need to get excel sheet as an output for matched data and mismatched data using simulink model. Tell me how to read the excel sheet, compare it and and how to get the excel sheet as an output? I have two excel sheets, Data1 and Data2. I need to compare both the excel sheet and atlast I need to get excel sheet as an output for matched data and mismatched data using simulink model. Tell me how to read the excel sheet, compare it and and how to get the excel sheet as an output? function model MATLAB Answers — New Questions
Find the ratio or difference spectra as time progresses
Hi, I have a number of spectra that has been collected over a certain number of hours. How do I compute the difference spectra or ratio spectra over that time period? So say spectrum 1 is rationed with spectrum 2, spectrum 3 rationed with spectrum 2 etc. can same be done with difference spectrum as well? Any algorithm to do this? Thank you.Hi, I have a number of spectra that has been collected over a certain number of hours. How do I compute the difference spectra or ratio spectra over that time period? So say spectrum 1 is rationed with spectrum 2, spectrum 3 rationed with spectrum 2 etc. can same be done with difference spectrum as well? Any algorithm to do this? Thank you. Hi, I have a number of spectra that has been collected over a certain number of hours. How do I compute the difference spectra or ratio spectra over that time period? So say spectrum 1 is rationed with spectrum 2, spectrum 3 rationed with spectrum 2 etc. can same be done with difference spectrum as well? Any algorithm to do this? Thank you. matlab MATLAB Answers — New Questions
How to split my EMG signal into individual cycles?
Hi I have recorded an emg signal of 5 different muscles on someone performing manual wheelchair propulsion.
Sensor 1 = biceps
Sensor 2 = triceps
Sensor 3 = Anterioir Deltoid
Sensor 4 = Posterior Deltoid
Sensor 5 = Upper Trapezius
Each sensor also records the acceleration in the x, y and z directions.
I want to split the emg signal into seperate propulsion cycles (when the hand pushes and releases to when the hand hits the push rim again.) so that I can average each cycle, as well as convert time (s) to percentage of cycle.
I know there were 13-14 cycles during the recording as i videoed the subject while gathering data.
I have only looked at the bicep data as shown below and was wondeing if there is a way to do this with the information I have.
Please let me know if you need anymore information.
%% SEMG Signal Analysis – Row Test 1 Participant 1 28/06/2024
% *This is my practice code to figure out how to export the data into MATLAB and transfer the data into arrays that I can manipulate and do calculations with. *
clear all;
clc;
%% Importing raw data from csv. file
% *BOLD TEXT*
raw_data = readmatrix(‘P02_S09_T01.csv’);
%% SEMG Time Data
% *Storing the Sub-frame data in arrays*
fs = 1926; % sampling frequency in Hz
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
row = 4;
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Sub_Frame = [Sub_Frame, number];
row = row + 1;
end
Time = (1:length(Sub_Frame))/fs; % converting the sub frame array into time in seconds array
%% Acceleration Sensor 1 (bicep) ACCY1
%
% Find the maximum row number
maxRow = size(raw_data, 1);
acc_fs = 148; %sa/sec
%find sub frame for acceleration
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Acc_Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
acc_row = 77955;
while acc_row <= maxRow
number = raw_data(acc_row, columnIndex);
Acc_Sub_Frame = [Acc_Sub_Frame, number];
acc_row = acc_row + 1;
end
Acc_Time = (1:length(Acc_Sub_Frame))/acc_fs; % converting the sub frame array into time in seconds array
columnIndex4 = 4; % Corresponds to ACCY1 (acceleration in the y-direction of sensor 1).
ACCY1 = []; % Creating an array to store all the AccY1
row2 = 77955;
while row2 <= maxRow
num = raw_data(row2, columnIndex4);
ACCY1 = [ACCY1, num];
row2 = row2 + 1;
end
acc_rms_signal = [];
window = 50;
acc_rms_signal = sqrt(movmean((ACCY1.^2),window));
%% Muscle arrays
% Sensor #1 – Biceps Brachii
% Sensor #2 – Triceps Brachii
% Sensor #3 – Anterioir Deltoid
% Sensor #4 – Posterior Deltoid
% Sensor #5 – Upper Trapezius
% *Storing the muscle data in arrays*
columnIndex = 3; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Biceps_Brachii = [];% Creating an array to store all the frames related to the EMG data
row = 4; % This is the starting position of the Frame data
% Create a for loop to run through every sensor and store in each array.
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Biceps_Brachii = [Biceps_Brachii, number];
row = row + 1;
end
%% BP filter
% filtering from 20 to Hz
fnyq = fs/2;
fcuthigh = 20;
fcutlow = 450;
%4th order Butterworth BP filter
[b,a]=butter(4,[fcuthigh,fcutlow]/fnyq,’bandpass’);
butterworth_filter_signal=filtfilt(b,a,Biceps_Brachii);
%% RMS
%
rms_signal = [];
window = 50;
rms_signal = sqrt(movmean((rec_signal.^2),window));
% Create a figure with two subplots
figure;
% Plot the first graph on the top
subplot(2, 1, 1);
plot(Time, rms_signal);
title(‘EMG’);
% Plot the second graph on the bottom
subplot(2, 1, 2);
plot(Acc_Time, acc_rms_signal);
title(‘Acceleration’);Hi I have recorded an emg signal of 5 different muscles on someone performing manual wheelchair propulsion.
Sensor 1 = biceps
Sensor 2 = triceps
Sensor 3 = Anterioir Deltoid
Sensor 4 = Posterior Deltoid
Sensor 5 = Upper Trapezius
Each sensor also records the acceleration in the x, y and z directions.
I want to split the emg signal into seperate propulsion cycles (when the hand pushes and releases to when the hand hits the push rim again.) so that I can average each cycle, as well as convert time (s) to percentage of cycle.
I know there were 13-14 cycles during the recording as i videoed the subject while gathering data.
I have only looked at the bicep data as shown below and was wondeing if there is a way to do this with the information I have.
Please let me know if you need anymore information.
%% SEMG Signal Analysis – Row Test 1 Participant 1 28/06/2024
% *This is my practice code to figure out how to export the data into MATLAB and transfer the data into arrays that I can manipulate and do calculations with. *
clear all;
clc;
%% Importing raw data from csv. file
% *BOLD TEXT*
raw_data = readmatrix(‘P02_S09_T01.csv’);
%% SEMG Time Data
% *Storing the Sub-frame data in arrays*
fs = 1926; % sampling frequency in Hz
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
row = 4;
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Sub_Frame = [Sub_Frame, number];
row = row + 1;
end
Time = (1:length(Sub_Frame))/fs; % converting the sub frame array into time in seconds array
%% Acceleration Sensor 1 (bicep) ACCY1
%
% Find the maximum row number
maxRow = size(raw_data, 1);
acc_fs = 148; %sa/sec
%find sub frame for acceleration
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Acc_Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
acc_row = 77955;
while acc_row <= maxRow
number = raw_data(acc_row, columnIndex);
Acc_Sub_Frame = [Acc_Sub_Frame, number];
acc_row = acc_row + 1;
end
Acc_Time = (1:length(Acc_Sub_Frame))/acc_fs; % converting the sub frame array into time in seconds array
columnIndex4 = 4; % Corresponds to ACCY1 (acceleration in the y-direction of sensor 1).
ACCY1 = []; % Creating an array to store all the AccY1
row2 = 77955;
while row2 <= maxRow
num = raw_data(row2, columnIndex4);
ACCY1 = [ACCY1, num];
row2 = row2 + 1;
end
acc_rms_signal = [];
window = 50;
acc_rms_signal = sqrt(movmean((ACCY1.^2),window));
%% Muscle arrays
% Sensor #1 – Biceps Brachii
% Sensor #2 – Triceps Brachii
% Sensor #3 – Anterioir Deltoid
% Sensor #4 – Posterior Deltoid
% Sensor #5 – Upper Trapezius
% *Storing the muscle data in arrays*
columnIndex = 3; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Biceps_Brachii = [];% Creating an array to store all the frames related to the EMG data
row = 4; % This is the starting position of the Frame data
% Create a for loop to run through every sensor and store in each array.
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Biceps_Brachii = [Biceps_Brachii, number];
row = row + 1;
end
%% BP filter
% filtering from 20 to Hz
fnyq = fs/2;
fcuthigh = 20;
fcutlow = 450;
%4th order Butterworth BP filter
[b,a]=butter(4,[fcuthigh,fcutlow]/fnyq,’bandpass’);
butterworth_filter_signal=filtfilt(b,a,Biceps_Brachii);
%% RMS
%
rms_signal = [];
window = 50;
rms_signal = sqrt(movmean((rec_signal.^2),window));
% Create a figure with two subplots
figure;
% Plot the first graph on the top
subplot(2, 1, 1);
plot(Time, rms_signal);
title(‘EMG’);
% Plot the second graph on the bottom
subplot(2, 1, 2);
plot(Acc_Time, acc_rms_signal);
title(‘Acceleration’); Hi I have recorded an emg signal of 5 different muscles on someone performing manual wheelchair propulsion.
Sensor 1 = biceps
Sensor 2 = triceps
Sensor 3 = Anterioir Deltoid
Sensor 4 = Posterior Deltoid
Sensor 5 = Upper Trapezius
Each sensor also records the acceleration in the x, y and z directions.
I want to split the emg signal into seperate propulsion cycles (when the hand pushes and releases to when the hand hits the push rim again.) so that I can average each cycle, as well as convert time (s) to percentage of cycle.
I know there were 13-14 cycles during the recording as i videoed the subject while gathering data.
I have only looked at the bicep data as shown below and was wondeing if there is a way to do this with the information I have.
Please let me know if you need anymore information.
%% SEMG Signal Analysis – Row Test 1 Participant 1 28/06/2024
% *This is my practice code to figure out how to export the data into MATLAB and transfer the data into arrays that I can manipulate and do calculations with. *
clear all;
clc;
%% Importing raw data from csv. file
% *BOLD TEXT*
raw_data = readmatrix(‘P02_S09_T01.csv’);
%% SEMG Time Data
% *Storing the Sub-frame data in arrays*
fs = 1926; % sampling frequency in Hz
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
row = 4;
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Sub_Frame = [Sub_Frame, number];
row = row + 1;
end
Time = (1:length(Sub_Frame))/fs; % converting the sub frame array into time in seconds array
%% Acceleration Sensor 1 (bicep) ACCY1
%
% Find the maximum row number
maxRow = size(raw_data, 1);
acc_fs = 148; %sa/sec
%find sub frame for acceleration
columnIndex = 2; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Acc_Sub_Frame = []; % Creating an array to store all the sub-frames related to the EMG data
acc_row = 77955;
while acc_row <= maxRow
number = raw_data(acc_row, columnIndex);
Acc_Sub_Frame = [Acc_Sub_Frame, number];
acc_row = acc_row + 1;
end
Acc_Time = (1:length(Acc_Sub_Frame))/acc_fs; % converting the sub frame array into time in seconds array
columnIndex4 = 4; % Corresponds to ACCY1 (acceleration in the y-direction of sensor 1).
ACCY1 = []; % Creating an array to store all the AccY1
row2 = 77955;
while row2 <= maxRow
num = raw_data(row2, columnIndex4);
ACCY1 = [ACCY1, num];
row2 = row2 + 1;
end
acc_rms_signal = [];
window = 50;
acc_rms_signal = sqrt(movmean((ACCY1.^2),window));
%% Muscle arrays
% Sensor #1 – Biceps Brachii
% Sensor #2 – Triceps Brachii
% Sensor #3 – Anterioir Deltoid
% Sensor #4 – Posterior Deltoid
% Sensor #5 – Upper Trapezius
% *Storing the muscle data in arrays*
columnIndex = 3; % Specify the index of the column you want to extract (1 for the Frame column, 2 for the Sub Frame column, and so on)
Biceps_Brachii = [];% Creating an array to store all the frames related to the EMG data
row = 4; % This is the starting position of the Frame data
% Create a for loop to run through every sensor and store in each array.
while ~isnan(raw_data(row, columnIndex))
number = raw_data(row, columnIndex);
Biceps_Brachii = [Biceps_Brachii, number];
row = row + 1;
end
%% BP filter
% filtering from 20 to Hz
fnyq = fs/2;
fcuthigh = 20;
fcutlow = 450;
%4th order Butterworth BP filter
[b,a]=butter(4,[fcuthigh,fcutlow]/fnyq,’bandpass’);
butterworth_filter_signal=filtfilt(b,a,Biceps_Brachii);
%% RMS
%
rms_signal = [];
window = 50;
rms_signal = sqrt(movmean((rec_signal.^2),window));
% Create a figure with two subplots
figure;
% Plot the first graph on the top
subplot(2, 1, 1);
plot(Time, rms_signal);
title(‘EMG’);
% Plot the second graph on the bottom
subplot(2, 1, 2);
plot(Acc_Time, acc_rms_signal);
title(‘Acceleration’); emg, cycle, signal processing MATLAB Answers — New Questions
how can i access to the export button on the architecture views of the system composer, using code?
I want to access the "export" button that is in the toolstrip of the architecture view tab, through code. Is it possible that with code or some function, I can export a view as if I had pressed the "export" button?
I have tried creating a report, but the images of the view are bad quality, it does not get the same quality and page orientation as if i clicked the export button.I want to access the "export" button that is in the toolstrip of the architecture view tab, through code. Is it possible that with code or some function, I can export a view as if I had pressed the "export" button?
I have tried creating a report, but the images of the view are bad quality, it does not get the same quality and page orientation as if i clicked the export button. I want to access the "export" button that is in the toolstrip of the architecture view tab, through code. Is it possible that with code or some function, I can export a view as if I had pressed the "export" button?
I have tried creating a report, but the images of the view are bad quality, it does not get the same quality and page orientation as if i clicked the export button. export, button, architecture views MATLAB Answers — New Questions
What does gca mean?
hello together, I’m a Beginner and I have a friends’ skript and I’m trying to understand it.
1.)I don’t really understand the "set"/"get" programmation als well as the "gca"/the "1" in the first line…
2.) Furthermore I didn’t understand what the:
{it t}
stands for (last line)…
for a Diagramm he wrote:
set(gca,’XGrid’,’on’, ‘YGrid’, ‘on’, ‘Fontsize’, 16, ‘linewidth’, 1)
x_axis = get(gca, ‘xtik’);
xlabel(‘time{it t} [s]’)
I’ve already been searching for this question, but too many other questions without any correlation to this theme were found…
Thanks!hello together, I’m a Beginner and I have a friends’ skript and I’m trying to understand it.
1.)I don’t really understand the "set"/"get" programmation als well as the "gca"/the "1" in the first line…
2.) Furthermore I didn’t understand what the:
{it t}
stands for (last line)…
for a Diagramm he wrote:
set(gca,’XGrid’,’on’, ‘YGrid’, ‘on’, ‘Fontsize’, 16, ‘linewidth’, 1)
x_axis = get(gca, ‘xtik’);
xlabel(‘time{it t} [s]’)
I’ve already been searching for this question, but too many other questions without any correlation to this theme were found…
Thanks! hello together, I’m a Beginner and I have a friends’ skript and I’m trying to understand it.
1.)I don’t really understand the "set"/"get" programmation als well as the "gca"/the "1" in the first line…
2.) Furthermore I didn’t understand what the:
{it t}
stands for (last line)…
for a Diagramm he wrote:
set(gca,’XGrid’,’on’, ‘YGrid’, ‘on’, ‘Fontsize’, 16, ‘linewidth’, 1)
x_axis = get(gca, ‘xtik’);
xlabel(‘time{it t} [s]’)
I’ve already been searching for this question, but too many other questions without any correlation to this theme were found…
Thanks! set, get, gca MATLAB Answers — New Questions
Compiled exe app doesn’t work on a function used within another function
So I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
endSo I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
end So I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
end app designer, compiler, standalone, exe, function MATLAB Answers — New Questions
How to plot one curve and change color according to value
The tricky thing is that I get an attribute with the values and would like to have this part in the plot in a different color:
x = linspace(0,10);
y = sin(3*x).*exp(0.5*x);
c = find(y > 25);
m(length(x)) = 0;
m(c) = 1;
figure;
plot(x, y, ‘b’)
Where m becomes 1 the color should be red, else blue.
Can someone find the easiest way to do this?The tricky thing is that I get an attribute with the values and would like to have this part in the plot in a different color:
x = linspace(0,10);
y = sin(3*x).*exp(0.5*x);
c = find(y > 25);
m(length(x)) = 0;
m(c) = 1;
figure;
plot(x, y, ‘b’)
Where m becomes 1 the color should be red, else blue.
Can someone find the easiest way to do this? The tricky thing is that I get an attribute with the values and would like to have this part in the plot in a different color:
x = linspace(0,10);
y = sin(3*x).*exp(0.5*x);
c = find(y > 25);
m(length(x)) = 0;
m(c) = 1;
figure;
plot(x, y, ‘b’)
Where m becomes 1 the color should be red, else blue.
Can someone find the easiest way to do this? plot, changing color MATLAB Answers — New Questions
Source code for solving second order PDE using PINN
Hi
Can someone share the matlab source code for solving second order ODE of the type as below?
I could build a sample code using : https://uk.mathworks.com/help/deeplearning/ug/solve-partial-differential-equations-with-lbfgs-method-and-deep-learning.html#responsive_offcanvas
But, I am not sure how to input the IC of the form d/dx() in the code.
All help will be appreciated.
ThanksHi
Can someone share the matlab source code for solving second order ODE of the type as below?
I could build a sample code using : https://uk.mathworks.com/help/deeplearning/ug/solve-partial-differential-equations-with-lbfgs-method-and-deep-learning.html#responsive_offcanvas
But, I am not sure how to input the IC of the form d/dx() in the code.
All help will be appreciated.
Thanks Hi
Can someone share the matlab source code for solving second order ODE of the type as below?
I could build a sample code using : https://uk.mathworks.com/help/deeplearning/ug/solve-partial-differential-equations-with-lbfgs-method-and-deep-learning.html#responsive_offcanvas
But, I am not sure how to input the IC of the form d/dx() in the code.
All help will be appreciated.
Thanks pinn MATLAB Answers — New Questions
Nondimensionalizing Length and Temp data from 2-D Ansys Transient thermal in Matlab
I have a text file that has dimensionalized data from Ansys (in micron and Kelvin). The first column is length and the second column is temperature. I am trying to nondimensionalize these data points and then put them in a graph where the x-axis represents nondimensionalized length and the y-axis represends nondimensionalized temperature.
xs = 100µm
Tf = 500K
Ti = 300K
How do I nondimensionalize this properly?I have a text file that has dimensionalized data from Ansys (in micron and Kelvin). The first column is length and the second column is temperature. I am trying to nondimensionalize these data points and then put them in a graph where the x-axis represents nondimensionalized length and the y-axis represends nondimensionalized temperature.
xs = 100µm
Tf = 500K
Ti = 300K
How do I nondimensionalize this properly? I have a text file that has dimensionalized data from Ansys (in micron and Kelvin). The first column is length and the second column is temperature. I am trying to nondimensionalize these data points and then put them in a graph where the x-axis represents nondimensionalized length and the y-axis represends nondimensionalized temperature.
xs = 100µm
Tf = 500K
Ti = 300K
How do I nondimensionalize this properly? nondimensionalize, matlab, text file, data, temperature, length, graph MATLAB Answers — New Questions
Solving trigonometric simultaneous equations
Is it possible to solve when the equations are little complex? For example lets’s take an inverse kinematics problem. Where we get,
-0.2595 0.5536 0.7913 0.3004 r11 r12 r13 o1
-0.7781 -0.6052 0.1682 0.0639 = r21 r22 r23 o2
0.5721 -0.5721 0.5878 0.6167 r31 r32 r33 o3
0 0 0 1 0 0 0 0
each of these symbols represents a trigonometric function such as below. Need to find θ1,θ2,θ3,θ4,θ5
[ sin(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta5)*sin(theta1) + sin(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)) – sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)), (1143*cos(theta1)*cos(theta2))/5000 + (127*cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)))/1600 – (127*sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)))/1600 – (1143*cos(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta1)*cos(theta2)*cos(theta3))/5000]
[ – cos(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))), sin(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))) – cos(theta1)*cos(theta5), cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)) – sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)), (1143*cos(theta2)*sin(theta1))/5000 + (127*cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)))/1600 – (127*sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)))/1600 – (1143*sin(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta2)*cos(theta3)*sin(theta1))/5000]
[ cos(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), -sin(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) – cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)), (1143*sin(theta2))/5000 + (1143*cos(theta2)*sin(theta3))/5000 + (1143*cos(theta3)*sin(theta2))/5000 – (127*cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)))/1600 + (127*sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)))/1600 + 4953/20000]
[ 0, 0, 0, 1]
Is matlab capable of solving such equations?
Thank you.Is it possible to solve when the equations are little complex? For example lets’s take an inverse kinematics problem. Where we get,
-0.2595 0.5536 0.7913 0.3004 r11 r12 r13 o1
-0.7781 -0.6052 0.1682 0.0639 = r21 r22 r23 o2
0.5721 -0.5721 0.5878 0.6167 r31 r32 r33 o3
0 0 0 1 0 0 0 0
each of these symbols represents a trigonometric function such as below. Need to find θ1,θ2,θ3,θ4,θ5
[ sin(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta5)*sin(theta1) + sin(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)) – sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)), (1143*cos(theta1)*cos(theta2))/5000 + (127*cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)))/1600 – (127*sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)))/1600 – (1143*cos(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta1)*cos(theta2)*cos(theta3))/5000]
[ – cos(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))), sin(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))) – cos(theta1)*cos(theta5), cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)) – sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)), (1143*cos(theta2)*sin(theta1))/5000 + (127*cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)))/1600 – (127*sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)))/1600 – (1143*sin(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta2)*cos(theta3)*sin(theta1))/5000]
[ cos(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), -sin(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) – cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)), (1143*sin(theta2))/5000 + (1143*cos(theta2)*sin(theta3))/5000 + (1143*cos(theta3)*sin(theta2))/5000 – (127*cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)))/1600 + (127*sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)))/1600 + 4953/20000]
[ 0, 0, 0, 1]
Is matlab capable of solving such equations?
Thank you. Is it possible to solve when the equations are little complex? For example lets’s take an inverse kinematics problem. Where we get,
-0.2595 0.5536 0.7913 0.3004 r11 r12 r13 o1
-0.7781 -0.6052 0.1682 0.0639 = r21 r22 r23 o2
0.5721 -0.5721 0.5878 0.6167 r31 r32 r33 o3
0 0 0 1 0 0 0 0
each of these symbols represents a trigonometric function such as below. Need to find θ1,θ2,θ3,θ4,θ5
[ sin(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta5)*sin(theta1) + sin(theta5)*(cos(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)) + sin(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2))), cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)) – sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)), (1143*cos(theta1)*cos(theta2))/5000 + (127*cos(theta4)*(cos(theta1)*cos(theta2)*sin(theta3) + cos(theta1)*cos(theta3)*sin(theta2)))/1600 – (127*sin(theta4)*(cos(theta1)*sin(theta2)*sin(theta3) – cos(theta1)*cos(theta2)*cos(theta3)))/1600 – (1143*cos(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta1)*cos(theta2)*cos(theta3))/5000]
[ – cos(theta1)*sin(theta5) – cos(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))), sin(theta5)*(cos(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)) + sin(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2))) – cos(theta1)*cos(theta5), cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)) – sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)), (1143*cos(theta2)*sin(theta1))/5000 + (127*cos(theta4)*(cos(theta2)*sin(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)))/1600 – (127*sin(theta4)*(sin(theta1)*sin(theta2)*sin(theta3) – cos(theta2)*cos(theta3)*sin(theta1)))/1600 – (1143*sin(theta1)*sin(theta2)*sin(theta3))/5000 + (1143*cos(theta2)*cos(theta3)*sin(theta1))/5000]
[ cos(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), -sin(theta5)*(cos(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) + sin(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3))), sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)) – cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)), (1143*sin(theta2))/5000 + (1143*cos(theta2)*sin(theta3))/5000 + (1143*cos(theta3)*sin(theta2))/5000 – (127*cos(theta4)*(cos(theta2)*cos(theta3) – sin(theta2)*sin(theta3)))/1600 + (127*sin(theta4)*(cos(theta2)*sin(theta3) + cos(theta3)*sin(theta2)))/1600 + 4953/20000]
[ 0, 0, 0, 1]
Is matlab capable of solving such equations?
Thank you. solve MATLAB Answers — New Questions
Can’t find vehicleDatasetImages.zip
I’m trying to use the dataset ‘vehicleDatasetImages’, but the function unzip returns this error:
Error using matlab.io.internal.archive.checkFilename>throwFileNotFoundError (line 156)
Function UNZIP was unable to find file ”vehicleDatasetImages.zip”.
What can I do?I’m trying to use the dataset ‘vehicleDatasetImages’, but the function unzip returns this error:
Error using matlab.io.internal.archive.checkFilename>throwFileNotFoundError (line 156)
Function UNZIP was unable to find file ”vehicleDatasetImages.zip”.
What can I do? I’m trying to use the dataset ‘vehicleDatasetImages’, but the function unzip returns this error:
Error using matlab.io.internal.archive.checkFilename>throwFileNotFoundError (line 156)
Function UNZIP was unable to find file ”vehicleDatasetImages.zip”.
What can I do? data, deep learning, object detection MATLAB Answers — New Questions
Permanent magnets in PDE toolbox
Dear all,
How do I describe a permanent magnet in the PDE toolbox ?
I could find nothing in electromagneticProperties or electromagneticSourceDear all,
How do I describe a permanent magnet in the PDE toolbox ?
I could find nothing in electromagneticProperties or electromagneticSource Dear all,
How do I describe a permanent magnet in the PDE toolbox ?
I could find nothing in electromagneticProperties or electromagneticSource pde magnetostatics magnet MATLAB Answers — New Questions
power Load flow equations
constraints=[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(1,4))]; Constraints=[Costraints,Qg(1,1)-Qd(1,1)==(-vmag(1,1))*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+..
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(1,4))];constraints=[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(1,4))]; Constraints=[Costraints,Qg(1,1)-Qd(1,1)==(-vmag(1,1))*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+..
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(1,4))]; constraints=[Costraints,Pg(1,1)-Pd(1,1)==vmag(1,1)*[vmag(1,1)*Ymag(1,1)*cos(Yang(1,1))+…
vmag(1,2)*Ymag(2,1)*cos(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*cos(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*cos(Yang(4,1) + vang(1,1) – vang(1,4))]; Constraints=[Costraints,Qg(1,1)-Qd(1,1)==(-vmag(1,1))*[vmag(1,1)*Ymag(1,1)*sin(Yang(1,1))+..
vmag(1,2)*Ymag(2,1)*sin(Yang(2,1) + vang(1,1) – vang(1,2))+…
vmag(1,3)*Ymag(3,1)*sin(Yang(3,1) + vang(1,1) – vang(1,3))+…
vmag(1,4)*Ymag(4,1)*sin(Yang(4,1) + vang(1,1) – vang(1,4))]; optimization of reactive power MATLAB Answers — New Questions
Simscape multibody composite rigid body inertia
Howdy,
I’m working with simscape multibody and I’ve seen using inertia sensor there’s chance to select a local group of connected blocks or whole mechanicsms. I was wondering if for a complex branched mechanism would be possible to take also a composite rigid body inertia measure (using actual configurations given by joints positions) for single branches in palce of whole mechanism of any workaround exist for.
Cheers,
Soldà EnricoHowdy,
I’m working with simscape multibody and I’ve seen using inertia sensor there’s chance to select a local group of connected blocks or whole mechanicsms. I was wondering if for a complex branched mechanism would be possible to take also a composite rigid body inertia measure (using actual configurations given by joints positions) for single branches in palce of whole mechanism of any workaround exist for.
Cheers,
Soldà Enrico Howdy,
I’m working with simscape multibody and I’ve seen using inertia sensor there’s chance to select a local group of connected blocks or whole mechanicsms. I was wondering if for a complex branched mechanism would be possible to take also a composite rigid body inertia measure (using actual configurations given by joints positions) for single branches in palce of whole mechanism of any workaround exist for.
Cheers,
Soldà Enrico simscape, inertia measures, composite rigid body MATLAB Answers — New Questions
code for segmentation of image using grabcut algorithm
I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(I,pad,MAXVAL)
% function [Ncut] = graphcuts(I)
% Input: I image
% pad: spatial connectivity; eg. 3
% MAXVAL: maximum image value
% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation
error :
Error using graph cuts
Not enough input arguments.I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(I,pad,MAXVAL)
% function [Ncut] = graphcuts(I)
% Input: I image
% pad: spatial connectivity; eg. 3
% MAXVAL: maximum image value
% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation
error :
Error using graph cuts
Not enough input arguments. I=imread(‘Lenna.jpg’);
pad=3;
MAXVAL=255;
[Ncut] = graphcuts(I,pad,MAXVAL)
% function [Ncut] = graphcuts(I)
% Input: I image
% pad: spatial connectivity; eg. 3
% MAXVAL: maximum image value
% Output: Ncut: Binary map 0 or 1 corresponding to image segmentation
error :
Error using graph cuts
Not enough input arguments. grabcuts/ graphcuts MATLAB Answers — New Questions
Why would I encounter an error message about unsuitable bus signal using DDS Blockset?
Hi,
I encounter the error : " The ‘input port 1’ of ‘ddsblockset1/Outport’ requires a bus, but it receives a non bus signal from the ‘output port 1’ of ‘ddsblockset1/Write DDS Sample’."
The data type of the input and output ports has been selected as the "Dataype" defined by DDS. I don’t seem to have any difference from the official example settings. Why did I encounter an error?Hi,
I encounter the error : " The ‘input port 1’ of ‘ddsblockset1/Outport’ requires a bus, but it receives a non bus signal from the ‘output port 1’ of ‘ddsblockset1/Write DDS Sample’."
The data type of the input and output ports has been selected as the "Dataype" defined by DDS. I don’t seem to have any difference from the official example settings. Why did I encounter an error? Hi,
I encounter the error : " The ‘input port 1’ of ‘ddsblockset1/Outport’ requires a bus, but it receives a non bus signal from the ‘output port 1’ of ‘ddsblockset1/Write DDS Sample’."
The data type of the input and output ports has been selected as the "Dataype" defined by DDS. I don’t seem to have any difference from the official example settings. Why did I encounter an error? dds blockset, simulink, bus signal MATLAB Answers — New Questions