Category: News
OCR (optical character recognition) misreading simple numbers even when image is pre-processed. What’s the issue?
I followed the advice in this ( https://www.mathworks.com/matlabcentral/answers/1955379-ocr-not-recognizing-some-numbers ) forum to pre-process a series of images but my code is still outputting terribly inaccurate results. I make sure to draw the ROI just around the "0.12" and it does not help. Here’s my code and one image:
clc; clear all
I = imread(‘test.jpg’);
I_gray = rgb2gray(I);
I_gray_binary = imbinarize(I_gray);
I_f = medfilt2(I_gray_binary);
[J,roi] = imcrop(I_f);
ocrResults = ocr(I_f,roi,Language=’seven-segment’);
ocrResults.Text
Thanks to anyone who can offer any advice!I followed the advice in this ( https://www.mathworks.com/matlabcentral/answers/1955379-ocr-not-recognizing-some-numbers ) forum to pre-process a series of images but my code is still outputting terribly inaccurate results. I make sure to draw the ROI just around the "0.12" and it does not help. Here’s my code and one image:
clc; clear all
I = imread(‘test.jpg’);
I_gray = rgb2gray(I);
I_gray_binary = imbinarize(I_gray);
I_f = medfilt2(I_gray_binary);
[J,roi] = imcrop(I_f);
ocrResults = ocr(I_f,roi,Language=’seven-segment’);
ocrResults.Text
Thanks to anyone who can offer any advice! I followed the advice in this ( https://www.mathworks.com/matlabcentral/answers/1955379-ocr-not-recognizing-some-numbers ) forum to pre-process a series of images but my code is still outputting terribly inaccurate results. I make sure to draw the ROI just around the "0.12" and it does not help. Here’s my code and one image:
clc; clear all
I = imread(‘test.jpg’);
I_gray = rgb2gray(I);
I_gray_binary = imbinarize(I_gray);
I_f = medfilt2(I_gray_binary);
[J,roi] = imcrop(I_f);
ocrResults = ocr(I_f,roi,Language=’seven-segment’);
ocrResults.Text
Thanks to anyone who can offer any advice! image processing, ocr, computer vision MATLAB Answers — New Questions
Actiate licence with email as requested
My college has a MATLAB licence, how do I link to that licence?
Some computers are running MATLAB.My college has a MATLAB licence, how do I link to that licence?
Some computers are running MATLAB. My college has a MATLAB licence, how do I link to that licence?
Some computers are running MATLAB. matlab simulink control MATLAB Answers — New Questions
vpasolve giving incorrect answers for a system of trigonometric equations. Where’s the error??
I’m trying to use vpasolve to solve a system of trigonomic equations. Known variables are Sa1, Sa2, and Sa3. Unknown variables are S, AR, PHI. The code hasn’t been giving me the correct results, but I can’t figure out where the error is.
Can someone with sharper eyes spot the problem?
I assigned fake values for the unknown variables, so I could calculate known variable values to test.
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%assign fake values to unknown variables
S = 3.4e-5; AR = 10; PHI = 36;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%calculate known variable values to test
Sa1 = S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2)
Sa2 = S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2)
Sa3 = S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)
The above returns Sa1 = 1.0752e-05, Sa2 = 1.0753e-05, and Sa3 = 1.0894e-05.
Having created known variable values with my fake unknown variable values, I’m not able to return the numbers I assigned. The code below is what I’m trying to use in my project.
syms S AR PHI
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%values for known variables
Sa1 = 1.0752e-05;
Sa2 = 1.0753e-05;
Sa3 = 1.0894e-05;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%define system of equations and solve
EQN = [Sa1 == S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2), …
Sa2 == S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2), …
Sa3 == S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)];
[S,AR,PHI] = vpasolve(EQN)
The above code returns nonsense. Why?I’m trying to use vpasolve to solve a system of trigonomic equations. Known variables are Sa1, Sa2, and Sa3. Unknown variables are S, AR, PHI. The code hasn’t been giving me the correct results, but I can’t figure out where the error is.
Can someone with sharper eyes spot the problem?
I assigned fake values for the unknown variables, so I could calculate known variable values to test.
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%assign fake values to unknown variables
S = 3.4e-5; AR = 10; PHI = 36;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%calculate known variable values to test
Sa1 = S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2)
Sa2 = S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2)
Sa3 = S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)
The above returns Sa1 = 1.0752e-05, Sa2 = 1.0753e-05, and Sa3 = 1.0894e-05.
Having created known variable values with my fake unknown variable values, I’m not able to return the numbers I assigned. The code below is what I’m trying to use in my project.
syms S AR PHI
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%values for known variables
Sa1 = 1.0752e-05;
Sa2 = 1.0753e-05;
Sa3 = 1.0894e-05;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%define system of equations and solve
EQN = [Sa1 == S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2), …
Sa2 == S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2), …
Sa3 == S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)];
[S,AR,PHI] = vpasolve(EQN)
The above code returns nonsense. Why? I’m trying to use vpasolve to solve a system of trigonomic equations. Known variables are Sa1, Sa2, and Sa3. Unknown variables are S, AR, PHI. The code hasn’t been giving me the correct results, but I can’t figure out where the error is.
Can someone with sharper eyes spot the problem?
I assigned fake values for the unknown variables, so I could calculate known variable values to test.
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%assign fake values to unknown variables
S = 3.4e-5; AR = 10; PHI = 36;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%calculate known variable values to test
Sa1 = S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2)
Sa2 = S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2)
Sa3 = S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)
The above returns Sa1 = 1.0752e-05, Sa2 = 1.0753e-05, and Sa3 = 1.0894e-05.
Having created known variable values with my fake unknown variable values, I’m not able to return the numbers I assigned. The code below is what I’m trying to use in my project.
syms S AR PHI
%locations of observation points
x1 = -9.72; y1 = -5.62; %OBS4
x2 = -4.95; y2 = -5.60; %OBS5
x3 = 6.63; y3 = -3.76; %OBS6
%values for known variables
Sa1 = 1.0752e-05;
Sa2 = 1.0753e-05;
Sa3 = 1.0894e-05;
%interim variables
W1 = ((-x1*sind(PHI) + y1*cosd(PHI)) / (y1*sind(PHI) + x1*cosd(PHI)));
W2 = ((-x2*sind(PHI) + y2*cosd(PHI)) / (y2*sind(PHI) + x2*cosd(PHI)));
W3 = ((-x3*sind(PHI) + y3*cosd(PHI)) / (y3*sind(PHI) + x3*cosd(PHI)));
%define system of equations and solve
EQN = [Sa1 == S*(sqrt(AR^-1)*(cosd(W1))^2+sqrt(AR)*(sind(W1))^2), …
Sa2 == S*(sqrt(AR^-1)*(cosd(W2))^2+sqrt(AR)*(sind(W2))^2), …
Sa3 == S*(sqrt(AR^-1)*(cosd(W3))^2+sqrt(AR)*(sind(W3))^2)];
[S,AR,PHI] = vpasolve(EQN)
The above code returns nonsense. Why? vpasolv, symbolic MATLAB Answers — New Questions
Feature Request: Restrict Name Editing in Shared Bookings for Organization (Similar to MS Forms)
I would like to request a feature for Shared Bookings within our organization.
It would be very helpful if there were an option to prevent users from editing their names when making a booking, similar to how Microsoft Forms handles name fields for authenticated users.
This feature would improve accuracy, as the names provided would be consistent across bookings.
I believe this feature would be beneficial for many organizations.
Best regards
I would like to request a feature for Shared Bookings within our organization. It would be very helpful if there were an option to prevent users from editing their names when making a booking, similar to how Microsoft Forms handles name fields for authenticated users. This feature would improve accuracy, as the names provided would be consistent across bookings.I believe this feature would be beneficial for many organizations. Best regards Read More
Gtk-Message: 10:32:31.466: Failed to load module “canberra-gtk-module”
I installed matlab 2019a with update3 on ubuntu 16.04 64bit. When I run matlab, I got output: Gtk-Message: 10:32:31.466: Failed to load module "canberra-gtk-module".
How to sort this problem.
Thanks in advance.I installed matlab 2019a with update3 on ubuntu 16.04 64bit. When I run matlab, I got output: Gtk-Message: 10:32:31.466: Failed to load module "canberra-gtk-module".
How to sort this problem.
Thanks in advance. I installed matlab 2019a with update3 on ubuntu 16.04 64bit. When I run matlab, I got output: Gtk-Message: 10:32:31.466: Failed to load module "canberra-gtk-module".
How to sort this problem.
Thanks in advance. start up MATLAB Answers — New Questions
Compiled version fails when highpass is called “Error using toolboxdir. Could not locate the base directory for dsp/filterdesign’.
I have created an App in App Designer which works fine until I compile. Everything still works as expected, except the functionality that uses the ‘highpass’ function from the Signal Processing toolbox. The log file states:
"Error using toolboxdir (line 54)
Could not locate the base directory for dsp/filterdesign.
I have checked that the toolbox is installed (I even reinstalled it again) and checked the path to the toolbox exists using toolboxdir(‘signal’).
I created a small test app that recreates the problem.The test app simply creates 100 random numbers, plots them and then applies the highpass filter on the click of a button. Again, the application fails once it is compiled.
I read that the Matlab compiler should detect and automatically include any toolbox requirements. I even tried forcing this detection by adding some non-consequential calls to highpass.m . The code for the test application is below.
Can anybody suggest what I am doing wrong?
classdef testHighPass < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
FilterButton matlab.ui.control.Button
GenerateDataButton matlab.ui.control.Button
plotAxes matlab.ui.control.UIAxes
end
properties (Access = private)
data % Description
x
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: GenerateDataButton
function GenerateDataButtonPushed(app, event)
app.data = rand(1, 100);
app.x = 1:100;
hold(app.plotAxes, ‘off’);
plot(app.plotAxes, app.x, app.data);
hold(app.plotAxes,’on’)
end
% Button pushed function: FilterButton
function FilterButtonPushed(app, event)
filt_data = highpass(app.data, 0.8);
plot(app.plotAxes, app.x, filt_data, ‘r’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = ‘MATLAB App’;
% Create plotAxes
app.plotAxes = uiaxes(app.UIFigure);
title(app.plotAxes, ‘Data’)
xlabel(app.plotAxes, ‘X’)
ylabel(app.plotAxes, ‘Y’)
zlabel(app.plotAxes, ‘Z’)
app.plotAxes.Position = [101 161 446 280];
% Create GenerateDataButton
app.GenerateDataButton = uibutton(app.UIFigure, ‘push’);
app.GenerateDataButton.ButtonPushedFcn = createCallbackFcn(app, @GenerateDataButtonPushed, true);
app.GenerateDataButton.Position = [74 95 122 37];
app.GenerateDataButton.Text = ‘Generate Data’;
% Create FilterButton
app.FilterButton = uibutton(app.UIFigure, ‘push’);
app.FilterButton.ButtonPushedFcn = createCallbackFcn(app, @FilterButtonPushed, true);
app.FilterButton.Position = [399 96 130 35];
app.FilterButton.Text = ‘Filter’;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = testHighPass
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
endI have created an App in App Designer which works fine until I compile. Everything still works as expected, except the functionality that uses the ‘highpass’ function from the Signal Processing toolbox. The log file states:
"Error using toolboxdir (line 54)
Could not locate the base directory for dsp/filterdesign.
I have checked that the toolbox is installed (I even reinstalled it again) and checked the path to the toolbox exists using toolboxdir(‘signal’).
I created a small test app that recreates the problem.The test app simply creates 100 random numbers, plots them and then applies the highpass filter on the click of a button. Again, the application fails once it is compiled.
I read that the Matlab compiler should detect and automatically include any toolbox requirements. I even tried forcing this detection by adding some non-consequential calls to highpass.m . The code for the test application is below.
Can anybody suggest what I am doing wrong?
classdef testHighPass < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
FilterButton matlab.ui.control.Button
GenerateDataButton matlab.ui.control.Button
plotAxes matlab.ui.control.UIAxes
end
properties (Access = private)
data % Description
x
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: GenerateDataButton
function GenerateDataButtonPushed(app, event)
app.data = rand(1, 100);
app.x = 1:100;
hold(app.plotAxes, ‘off’);
plot(app.plotAxes, app.x, app.data);
hold(app.plotAxes,’on’)
end
% Button pushed function: FilterButton
function FilterButtonPushed(app, event)
filt_data = highpass(app.data, 0.8);
plot(app.plotAxes, app.x, filt_data, ‘r’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = ‘MATLAB App’;
% Create plotAxes
app.plotAxes = uiaxes(app.UIFigure);
title(app.plotAxes, ‘Data’)
xlabel(app.plotAxes, ‘X’)
ylabel(app.plotAxes, ‘Y’)
zlabel(app.plotAxes, ‘Z’)
app.plotAxes.Position = [101 161 446 280];
% Create GenerateDataButton
app.GenerateDataButton = uibutton(app.UIFigure, ‘push’);
app.GenerateDataButton.ButtonPushedFcn = createCallbackFcn(app, @GenerateDataButtonPushed, true);
app.GenerateDataButton.Position = [74 95 122 37];
app.GenerateDataButton.Text = ‘Generate Data’;
% Create FilterButton
app.FilterButton = uibutton(app.UIFigure, ‘push’);
app.FilterButton.ButtonPushedFcn = createCallbackFcn(app, @FilterButtonPushed, true);
app.FilterButton.Position = [399 96 130 35];
app.FilterButton.Text = ‘Filter’;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = testHighPass
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end I have created an App in App Designer which works fine until I compile. Everything still works as expected, except the functionality that uses the ‘highpass’ function from the Signal Processing toolbox. The log file states:
"Error using toolboxdir (line 54)
Could not locate the base directory for dsp/filterdesign.
I have checked that the toolbox is installed (I even reinstalled it again) and checked the path to the toolbox exists using toolboxdir(‘signal’).
I created a small test app that recreates the problem.The test app simply creates 100 random numbers, plots them and then applies the highpass filter on the click of a button. Again, the application fails once it is compiled.
I read that the Matlab compiler should detect and automatically include any toolbox requirements. I even tried forcing this detection by adding some non-consequential calls to highpass.m . The code for the test application is below.
Can anybody suggest what I am doing wrong?
classdef testHighPass < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
FilterButton matlab.ui.control.Button
GenerateDataButton matlab.ui.control.Button
plotAxes matlab.ui.control.UIAxes
end
properties (Access = private)
data % Description
x
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: GenerateDataButton
function GenerateDataButtonPushed(app, event)
app.data = rand(1, 100);
app.x = 1:100;
hold(app.plotAxes, ‘off’);
plot(app.plotAxes, app.x, app.data);
hold(app.plotAxes,’on’)
end
% Button pushed function: FilterButton
function FilterButtonPushed(app, event)
filt_data = highpass(app.data, 0.8);
plot(app.plotAxes, app.x, filt_data, ‘r’);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure(‘Visible’, ‘off’);
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = ‘MATLAB App’;
% Create plotAxes
app.plotAxes = uiaxes(app.UIFigure);
title(app.plotAxes, ‘Data’)
xlabel(app.plotAxes, ‘X’)
ylabel(app.plotAxes, ‘Y’)
zlabel(app.plotAxes, ‘Z’)
app.plotAxes.Position = [101 161 446 280];
% Create GenerateDataButton
app.GenerateDataButton = uibutton(app.UIFigure, ‘push’);
app.GenerateDataButton.ButtonPushedFcn = createCallbackFcn(app, @GenerateDataButtonPushed, true);
app.GenerateDataButton.Position = [74 95 122 37];
app.GenerateDataButton.Text = ‘Generate Data’;
% Create FilterButton
app.FilterButton = uibutton(app.UIFigure, ‘push’);
app.FilterButton.ButtonPushedFcn = createCallbackFcn(app, @FilterButtonPushed, true);
app.FilterButton.Position = [399 96 130 35];
app.FilterButton.Text = ‘Filter’;
% Show the figure after all components are created
app.UIFigure.Visible = ‘on’;
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = testHighPass
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end runtime error, toolboxdir, base directory MATLAB Answers — New Questions
HELP WITH MY WHERE CLAUSE REQUIREMENT
Hello ,
I need help with examining this query.
I have this query below and my requirements. The First Requirement is
1. If appselection !=’notice to process’ and notetxt is NULL in last month show acct and no txt notes
2. if appselection=’notice to process’ and no notetxt in one month show the results (acctid)
—————————————————————————————
WITH NOTATION AS (SELECT
acctid,
appselection,
notetxt,xtp,
ndate
FROM TABLEA),
City as (acctid,
appselection
FROM EXAMPLE)
SELECT a.acctid,b.appselection,a.notetxt,a.ndate,a.xtp
FROM NOTATION a
LEFT JOIN b
ON a.acctid=b.acctid
WHERE b.appselection=’notice to process’ AND (a.notetxt IS NULL OR TO_DATE(a.ndate, ‘mm/dd/yyyy’)<=ADD_Months(SYSDATE,-1))) OR b.appselection=’notice to process’ AND (a.notetxt IS NULL OR TO_DATE(a.ndate,’mm/dd/yyyy’)<=ADD_MONTHS(sysdaate,-1)))
————————————————————————————-
I need another Where clause for requirement 2 using the same query above
REQUIREMENT b: show acctid with no notetxt in Last 2 weeks. below is what I have
WHERE n.notetxt IS NULL AND TO_DATE(n.ndate, ‘mm/dd/yyyy’)<=CURREN_DATE-14)
Hello ,I need help with examining this query.I have this query below and my requirements. The First Requirement is1. If appselection !=’notice to process’ and notetxt is NULL in last month show acct and no txt notes2. if appselection=’notice to process’ and no notetxt in one month show the results (acctid)—————————————————————————————WITH NOTATION AS (SELECTacctid,appselection,notetxt,xtp,ndateFROM TABLEA),City as (acctid,appselectionFROM EXAMPLE)SELECT a.acctid,b.appselection,a.notetxt,a.ndate,a.xtpFROM NOTATION aLEFT JOIN bON a.acctid=b.acctidWHERE b.appselection=’notice to process’ AND (a.notetxt IS NULL OR TO_DATE(a.ndate, ‘mm/dd/yyyy’)<=ADD_Months(SYSDATE,-1))) OR b.appselection=’notice to process’ AND (a.notetxt IS NULL OR TO_DATE(a.ndate,’mm/dd/yyyy’)<=ADD_MONTHS(sysdaate,-1)))————————————————————————————-I need another Where clause for requirement 2 using the same query aboveREQUIREMENT b: show acctid with no notetxt in Last 2 weeks. below is what I haveWHERE n.notetxt IS NULL AND TO_DATE(n.ndate, ‘mm/dd/yyyy’)<=CURREN_DATE-14) Read More
SNR comparison real/complex signal
Hello,
I have a problem which should be simple but I can’t figure out the best solution.
I have a real signal, cos of frequency f + noise of N points :
signal = sqrt(2 * Ps) * cos(2 * pi * f *t);
noise = sqrt(Pn) * randn(1, N);
total = signal + noise;
I consider the SNR on the whole signal Ps/Pn that I also check using
(mean(abs(signal.^2)) – mean(abs(noise.^2))) / mean(abs(noise.^2))
I filter this signal using a simple FFT of nFFT points and consider an extraction in the signal canal. For instance, with f / fs = 1/4, I consider the nFFT / 4 + 1 canal. Plotting the signal spectrum, I ensure the signal is centered in the FFT canal. Then I compute :
The power in the canal : PsCanal = mean(abs(samplesCanalWithSignal.^2)).
The noise level in a random other canal : PnCanal = mean(abs(samplesCanalWithoutSignal.^2))
And compute SNR in the canal : SNRCanal = (PsCanal – PnCanal) / PnCanal.
Now I consider a complex signal. Same time, fe, etc… I only change signal and noise definition in order to have same global powers :
signal = sqrt(Ps) * exp(2i * pi * f *t)
noise = sqrt(Pn / 2) *(randn(1, N) + 1i * randn(1, N))
total = signal + noise
When I compute the global RSB, I have the exact same RSB than with real signal.
Then I compute the FFT (same nFFT points) and compute SNRCanal = (PsCanal – PnCanal) / PnCanal
Result is the following (compared to real signal test) :
Same PnCanal
PsCanal multiplied by 2
RSBCanal multiplied by 2
Where am I wrong ? I would like to be able to estimate the correct SNR in the FFT canal for real signals… I understand the PSD of the cos is half the one of exp due to positive and negative frequencies, but don’t understand why it is not the case for the noise PSD. Do I have to transform something ?
Thank youHello,
I have a problem which should be simple but I can’t figure out the best solution.
I have a real signal, cos of frequency f + noise of N points :
signal = sqrt(2 * Ps) * cos(2 * pi * f *t);
noise = sqrt(Pn) * randn(1, N);
total = signal + noise;
I consider the SNR on the whole signal Ps/Pn that I also check using
(mean(abs(signal.^2)) – mean(abs(noise.^2))) / mean(abs(noise.^2))
I filter this signal using a simple FFT of nFFT points and consider an extraction in the signal canal. For instance, with f / fs = 1/4, I consider the nFFT / 4 + 1 canal. Plotting the signal spectrum, I ensure the signal is centered in the FFT canal. Then I compute :
The power in the canal : PsCanal = mean(abs(samplesCanalWithSignal.^2)).
The noise level in a random other canal : PnCanal = mean(abs(samplesCanalWithoutSignal.^2))
And compute SNR in the canal : SNRCanal = (PsCanal – PnCanal) / PnCanal.
Now I consider a complex signal. Same time, fe, etc… I only change signal and noise definition in order to have same global powers :
signal = sqrt(Ps) * exp(2i * pi * f *t)
noise = sqrt(Pn / 2) *(randn(1, N) + 1i * randn(1, N))
total = signal + noise
When I compute the global RSB, I have the exact same RSB than with real signal.
Then I compute the FFT (same nFFT points) and compute SNRCanal = (PsCanal – PnCanal) / PnCanal
Result is the following (compared to real signal test) :
Same PnCanal
PsCanal multiplied by 2
RSBCanal multiplied by 2
Where am I wrong ? I would like to be able to estimate the correct SNR in the FFT canal for real signals… I understand the PSD of the cos is half the one of exp due to positive and negative frequencies, but don’t understand why it is not the case for the noise PSD. Do I have to transform something ?
Thank you Hello,
I have a problem which should be simple but I can’t figure out the best solution.
I have a real signal, cos of frequency f + noise of N points :
signal = sqrt(2 * Ps) * cos(2 * pi * f *t);
noise = sqrt(Pn) * randn(1, N);
total = signal + noise;
I consider the SNR on the whole signal Ps/Pn that I also check using
(mean(abs(signal.^2)) – mean(abs(noise.^2))) / mean(abs(noise.^2))
I filter this signal using a simple FFT of nFFT points and consider an extraction in the signal canal. For instance, with f / fs = 1/4, I consider the nFFT / 4 + 1 canal. Plotting the signal spectrum, I ensure the signal is centered in the FFT canal. Then I compute :
The power in the canal : PsCanal = mean(abs(samplesCanalWithSignal.^2)).
The noise level in a random other canal : PnCanal = mean(abs(samplesCanalWithoutSignal.^2))
And compute SNR in the canal : SNRCanal = (PsCanal – PnCanal) / PnCanal.
Now I consider a complex signal. Same time, fe, etc… I only change signal and noise definition in order to have same global powers :
signal = sqrt(Ps) * exp(2i * pi * f *t)
noise = sqrt(Pn / 2) *(randn(1, N) + 1i * randn(1, N))
total = signal + noise
When I compute the global RSB, I have the exact same RSB than with real signal.
Then I compute the FFT (same nFFT points) and compute SNRCanal = (PsCanal – PnCanal) / PnCanal
Result is the following (compared to real signal test) :
Same PnCanal
PsCanal multiplied by 2
RSBCanal multiplied by 2
Where am I wrong ? I would like to be able to estimate the correct SNR in the FFT canal for real signals… I understand the PSD of the cos is half the one of exp due to positive and negative frequencies, but don’t understand why it is not the case for the noise PSD. Do I have to transform something ?
Thank you snr MATLAB Answers — New Questions
How to get holidays and business days from non-US countries in Financial Toolbox?
How do I get holidays and business days from countries other than the United States in Financial Toolbox?
The ‘holidays’ function only returns US holidays.How do I get holidays and business days from countries other than the United States in Financial Toolbox?
The ‘holidays’ function only returns US holidays. How do I get holidays and business days from countries other than the United States in Financial Toolbox?
The ‘holidays’ function only returns US holidays. holiday, businessday, isbusday, business MATLAB Answers — New Questions
How to initialize the Hammerstein model linear block and avoiding that the nlhw function transform the linear block to polynomial form ?
Hi.
I am trying to estiamte a Hammerstein Model. I have a state representation of the linear block to generate the Hammerstein model, however for some reason the idnlhw function convert the state representation that I have to polynomial form. The above should not be a problem, but the poles of linear block are close together due to the slow dynamcis of my system. From what i read in this post https://la.mathworks.com/help/control/ug/sensitivity-of-multiple-roots.html closelied space poles are very sensitivy to model transformaiton from state space to polynomial represntation.
The above becomes problematic because I want to program this model in a 32-bit microncontroller but this pole sensitivy changes the value of my poles when I convert them to single precision.
How can I solve this issue.Hi.
I am trying to estiamte a Hammerstein Model. I have a state representation of the linear block to generate the Hammerstein model, however for some reason the idnlhw function convert the state representation that I have to polynomial form. The above should not be a problem, but the poles of linear block are close together due to the slow dynamcis of my system. From what i read in this post https://la.mathworks.com/help/control/ug/sensitivity-of-multiple-roots.html closelied space poles are very sensitivy to model transformaiton from state space to polynomial represntation.
The above becomes problematic because I want to program this model in a 32-bit microncontroller but this pole sensitivy changes the value of my poles when I convert them to single precision.
How can I solve this issue. Hi.
I am trying to estiamte a Hammerstein Model. I have a state representation of the linear block to generate the Hammerstein model, however for some reason the idnlhw function convert the state representation that I have to polynomial form. The above should not be a problem, but the poles of linear block are close together due to the slow dynamcis of my system. From what i read in this post https://la.mathworks.com/help/control/ug/sensitivity-of-multiple-roots.html closelied space poles are very sensitivy to model transformaiton from state space to polynomial represntation.
The above becomes problematic because I want to program this model in a 32-bit microncontroller but this pole sensitivy changes the value of my poles when I convert them to single precision.
How can I solve this issue. hammerstein model, system identification MATLAB Answers — New Questions
How can I live-stream and visualize signals from my Speedgoat target computer running a real-time application?
What are the different methods to live-stream and visualize signals from Speedgoat hardware running a real-time application, and how can each method be configured?What are the different methods to live-stream and visualize signals from Speedgoat hardware running a real-time application, and how can each method be configured? What are the different methods to live-stream and visualize signals from Speedgoat hardware running a real-time application, and how can each method be configured? real-time, signal, streaming, tracing MATLAB Answers — New Questions
New MAC user with Excel app question.
I am new to MAC and going back to school using an online platform. The institution provides access to Office 365 and all apps on its website. I can open them, but when I open spreadsheets they come up with blue triangles in the data areas. To open the Excel sheet properly, I figured out I could open the Excel App (from the institution page) in a separate window and drag the assignment spreadsheet linked to my course content into the app. This opens it and lets me edit as I need. The next part of the assignment is to Copy the Excel graph and then Paste Special as a Microsoft Excel Object into the Word document. This is where I am stuck. I do not have the Paste Special option and everything I have tried to paste does not work out.
I am new to MAC and going back to school using an online platform. The institution provides access to Office 365 and all apps on its website. I can open them, but when I open spreadsheets they come up with blue triangles in the data areas. To open the Excel sheet properly, I figured out I could open the Excel App (from the institution page) in a separate window and drag the assignment spreadsheet linked to my course content into the app. This opens it and lets me edit as I need. The next part of the assignment is to Copy the Excel graph and then Paste Special as a Microsoft Excel Object into the Word document. This is where I am stuck. I do not have the Paste Special option and everything I have tried to paste does not work out. Read More
Latest Canary Win 11 versions and Star Wars Outlaws.
On my two computers with the latest versions of Canary, the game Star Wars Outlaws recently released by Ubisoft crashes. The game crashes after even several dozen seconds without any error message. Interestingly, many other people are complaining about the same problem in Canary Insider, and the error itself does not appear on the 23h2 version, but unfortunately causes problems on 24h2.
On my two computers with the latest versions of Canary, the game Star Wars Outlaws recently released by Ubisoft crashes. The game crashes after even several dozen seconds without any error message. Interestingly, many other people are complaining about the same problem in Canary Insider, and the error itself does not appear on the 23h2 version, but unfortunately causes problems on 24h2. Read More
Microsoft 365 Personal vs. Microsoft 365 Business
Is there a forum/community/hub for 365 Personal?
I am trying to find knucklehead that developed the auto-create Skype account feature for kids accounts on 365 Family.
Is there a forum/community/hub for 365 Personal? I am trying to find knucklehead that developed the auto-create Skype account feature for kids accounts on 365 Family. Read More
What system of ODE’s does Simscape Electrical’s DC Motor Block use?
I’ve been having trouble getting the DC Motor block’s results for current and rotational velocity to match what I obtain when using coupled differential equations in an ODE45 script. The results are very far apart and I’m not sure what is causing this.
The systems of equations I’ve implemented in ODE45 is standard in the DC motor literature, and is as follows:
Where is the current (), is the armature inductance (), is the armature resistance (), is the motor electrical constant (), is the voltage of the constant voltage source (), is the armature’s mass moment of inertia (), is the motor’s torque constant (), and is the motor damping ().
However, I’ve noticed that in the DC Motor block documentation, the equation for torque across the motor is given as (where is the damping constant). When I add the first term into my differential equation model, the results of ODE45 and Simscape Electrical become very close. I assume that this is the set of equations that Simscape is using, but I don’t like to use equations without understanding them. Where does this added term come from? I don’t believe I’ve seen it in the literature.
I’ve attached plots showing current and rotational velocity of the motor for the three models, so that you can see the discrepancies. (Note that there is zero damping in any of the models, yet only the classical differential equation model shows a rising angular velocity — the other models eventually reach some steady-state non-zero angular velocity.)
Any insight into what is happening here would be appreciated.I’ve been having trouble getting the DC Motor block’s results for current and rotational velocity to match what I obtain when using coupled differential equations in an ODE45 script. The results are very far apart and I’m not sure what is causing this.
The systems of equations I’ve implemented in ODE45 is standard in the DC motor literature, and is as follows:
Where is the current (), is the armature inductance (), is the armature resistance (), is the motor electrical constant (), is the voltage of the constant voltage source (), is the armature’s mass moment of inertia (), is the motor’s torque constant (), and is the motor damping ().
However, I’ve noticed that in the DC Motor block documentation, the equation for torque across the motor is given as (where is the damping constant). When I add the first term into my differential equation model, the results of ODE45 and Simscape Electrical become very close. I assume that this is the set of equations that Simscape is using, but I don’t like to use equations without understanding them. Where does this added term come from? I don’t believe I’ve seen it in the literature.
I’ve attached plots showing current and rotational velocity of the motor for the three models, so that you can see the discrepancies. (Note that there is zero damping in any of the models, yet only the classical differential equation model shows a rising angular velocity — the other models eventually reach some steady-state non-zero angular velocity.)
Any insight into what is happening here would be appreciated. I’ve been having trouble getting the DC Motor block’s results for current and rotational velocity to match what I obtain when using coupled differential equations in an ODE45 script. The results are very far apart and I’m not sure what is causing this.
The systems of equations I’ve implemented in ODE45 is standard in the DC motor literature, and is as follows:
Where is the current (), is the armature inductance (), is the armature resistance (), is the motor electrical constant (), is the voltage of the constant voltage source (), is the armature’s mass moment of inertia (), is the motor’s torque constant (), and is the motor damping ().
However, I’ve noticed that in the DC Motor block documentation, the equation for torque across the motor is given as (where is the damping constant). When I add the first term into my differential equation model, the results of ODE45 and Simscape Electrical become very close. I assume that this is the set of equations that Simscape is using, but I don’t like to use equations without understanding them. Where does this added term come from? I don’t believe I’ve seen it in the literature.
I’ve attached plots showing current and rotational velocity of the motor for the three models, so that you can see the discrepancies. (Note that there is zero damping in any of the models, yet only the classical differential equation model shows a rising angular velocity — the other models eventually reach some steady-state non-zero angular velocity.)
Any insight into what is happening here would be appreciated. simscape, differential equations MATLAB Answers — New Questions
N-dimension curve fit how to
Can someone please walk me through how to do a polynomial curve fit to n-dimensional data? For example: I have a 3D matrix t = [i x j x k] of results for all combinations of 3 different variables x = [i x 1], y = [j x 1], and z = [k x 1], and we know it follows a polynomial fit (e.g. x = 4th order, y = 2nd order, and z = 2nd order). How do I set up the problem, define the fit equation, and find the fit parameters?Can someone please walk me through how to do a polynomial curve fit to n-dimensional data? For example: I have a 3D matrix t = [i x j x k] of results for all combinations of 3 different variables x = [i x 1], y = [j x 1], and z = [k x 1], and we know it follows a polynomial fit (e.g. x = 4th order, y = 2nd order, and z = 2nd order). How do I set up the problem, define the fit equation, and find the fit parameters? Can someone please walk me through how to do a polynomial curve fit to n-dimensional data? For example: I have a 3D matrix t = [i x j x k] of results for all combinations of 3 different variables x = [i x 1], y = [j x 1], and z = [k x 1], and we know it follows a polynomial fit (e.g. x = 4th order, y = 2nd order, and z = 2nd order). How do I set up the problem, define the fit equation, and find the fit parameters? regression, curve fitting, polyfit MATLAB Answers — New Questions
Error trying to link Matlab and Aspen Plus
I have error message while trying to link Matlab with my Aspen Plus simulation:
>> CHLC
Error using COM.Apwn_Document_37_0/invoke
Invoke Error, Dispatch Exception:
Source: Aspen Plus 37.0 OLE Services
Description: Unable to open file.
Error in CHLC (line 8)
Aspen.invoke(‘InitFromFile’,[mess.Name ” Simulation_Name ‘.apwz’]);
This is the code im using:
%% Linking
Aspen = actxserver(‘Apwn.Document.37.0’);
[stat,mess]=fileattrib; % get attributes of folder (Necessary to establish the location of the simulation)
Simulation_Name = ‘CL_SCO2’;% Aspeen Plus Simulation Name
Aspen.invoke(‘InitFromArchive2’,[mess.Name ” Simulation_Name ‘.bkp’]);
Aspen.Visible = 1; % 1 —> Aspen is Visible; 0 —> Aspen is open but not visible
Aspen.SuppressDialogs = 1; % Suppress windows dialogs.
Aspen.Engine.Run2(1); % Run the simulation
while Aspen.Engine.IsRunning == 1 % 1 –> If Aspen is running; 0 —> If Aspen stop.
pause(0.5);
end
Matlab version is R2022a (9.12.0.1884302) 64-bit and Aspen plus V11 (37.0.0395)
Already try saving Aspen simulation as .bkp and .apwz.
Yes, two files ( .m matlab code and .awpz / .bkp simulation) are in the same folder.I have error message while trying to link Matlab with my Aspen Plus simulation:
>> CHLC
Error using COM.Apwn_Document_37_0/invoke
Invoke Error, Dispatch Exception:
Source: Aspen Plus 37.0 OLE Services
Description: Unable to open file.
Error in CHLC (line 8)
Aspen.invoke(‘InitFromFile’,[mess.Name ” Simulation_Name ‘.apwz’]);
This is the code im using:
%% Linking
Aspen = actxserver(‘Apwn.Document.37.0’);
[stat,mess]=fileattrib; % get attributes of folder (Necessary to establish the location of the simulation)
Simulation_Name = ‘CL_SCO2’;% Aspeen Plus Simulation Name
Aspen.invoke(‘InitFromArchive2’,[mess.Name ” Simulation_Name ‘.bkp’]);
Aspen.Visible = 1; % 1 —> Aspen is Visible; 0 —> Aspen is open but not visible
Aspen.SuppressDialogs = 1; % Suppress windows dialogs.
Aspen.Engine.Run2(1); % Run the simulation
while Aspen.Engine.IsRunning == 1 % 1 –> If Aspen is running; 0 —> If Aspen stop.
pause(0.5);
end
Matlab version is R2022a (9.12.0.1884302) 64-bit and Aspen plus V11 (37.0.0395)
Already try saving Aspen simulation as .bkp and .apwz.
Yes, two files ( .m matlab code and .awpz / .bkp simulation) are in the same folder. I have error message while trying to link Matlab with my Aspen Plus simulation:
>> CHLC
Error using COM.Apwn_Document_37_0/invoke
Invoke Error, Dispatch Exception:
Source: Aspen Plus 37.0 OLE Services
Description: Unable to open file.
Error in CHLC (line 8)
Aspen.invoke(‘InitFromFile’,[mess.Name ” Simulation_Name ‘.apwz’]);
This is the code im using:
%% Linking
Aspen = actxserver(‘Apwn.Document.37.0’);
[stat,mess]=fileattrib; % get attributes of folder (Necessary to establish the location of the simulation)
Simulation_Name = ‘CL_SCO2’;% Aspeen Plus Simulation Name
Aspen.invoke(‘InitFromArchive2’,[mess.Name ” Simulation_Name ‘.bkp’]);
Aspen.Visible = 1; % 1 —> Aspen is Visible; 0 —> Aspen is open but not visible
Aspen.SuppressDialogs = 1; % Suppress windows dialogs.
Aspen.Engine.Run2(1); % Run the simulation
while Aspen.Engine.IsRunning == 1 % 1 –> If Aspen is running; 0 —> If Aspen stop.
pause(0.5);
end
Matlab version is R2022a (9.12.0.1884302) 64-bit and Aspen plus V11 (37.0.0395)
Already try saving Aspen simulation as .bkp and .apwz.
Yes, two files ( .m matlab code and .awpz / .bkp simulation) are in the same folder. aspen puls, matlab, link, error MATLAB Answers — New Questions
What is the best method to model or utilize the built-in model for a three-phase voltage regulator in MATLAB Simulink, specifically for the IEEE 34 distribution network?
What is the best method to model or use the built-in model for a three-phase voltage regulator in MATLAB Simulink, specifically for the IEEE 34 distribution network, in a way that works properly with load flow analysis from the Powergui?What is the best method to model or use the built-in model for a three-phase voltage regulator in MATLAB Simulink, specifically for the IEEE 34 distribution network, in a way that works properly with load flow analysis from the Powergui? What is the best method to model or use the built-in model for a three-phase voltage regulator in MATLAB Simulink, specifically for the IEEE 34 distribution network, in a way that works properly with load flow analysis from the Powergui? matlab, simulink, voltage regulator, ieee 34, load MATLAB Answers — New Questions
Email disappears a few seconds after arriving.
I started noticing my email was starting to showing less of my important emails, I have checked all folders and it is just gone. I have seen them pop up and when I go to click on them they are gone before I can try. One time I was responding to an email and it just Disappeared in the middle of me typing. I can use the search menu to find the mail, but that is only if I know the mail I am looking for, when the email is deleted before I see it i can’t search for it. I have changed nothing on the settings and I have contacted support several times and had they were unable to help. I really need these emails so any help would be appreciated. Thank you for your time.
I started noticing my email was starting to showing less of my important emails, I have checked all folders and it is just gone. I have seen them pop up and when I go to click on them they are gone before I can try. One time I was responding to an email and it just Disappeared in the middle of me typing. I can use the search menu to find the mail, but that is only if I know the mail I am looking for, when the email is deleted before I see it i can’t search for it. I have changed nothing on the settings and I have contacted support several times and had they were unable to help. I really need these emails so any help would be appreciated. Thank you for your time. Read More