Category: Matlab
Category Archives: Matlab
I want to combine these two plots so they are placed sequentially in a bigger graph spanning -2 to 2. everything i try alters the data the plots show which i want to avoid.
Post Content Post Content fea, graph MATLAB Answers — New Questions
using knob to adjust audio frequency
How can I use a knob to adjust the frequency of audio such as the handel.mat soundHow can I use a knob to adjust the frequency of audio such as the handel.mat sound How can I use a knob to adjust the frequency of audio such as the handel.mat sound appdesigner, knob, audio MATLAB Answers — New Questions
How to truncate empty cells from a cell array?
I have a cell with some data that has empty cells in the array. Please disregard how ‘number_cell’ is made, it’s purely for example so readers have something to work with. In reality, I am receiving data that has empty rows and columns. I have no control over that.
number_cell = cell(4,4);
number_cell(1,1) = num2cell(1);
number_cell(1,2) = num2cell(2);
number_cell(1,4) = num2cell(3);
number_cell(2,1) = num2cell(7);
number_cell(2,2) = num2cell(8);
number_cell(2,4) = num2cell(9);
number_cell(4,1) = num2cell(14);
number_cell(4,2) = num2cell(15);
number_cell(4,4) = num2cell(17);
updated_cell = number_cell(~cellfun(‘isempty’,number_cell)) ; %I’ve tried playing with this to no avail.
The issue I have is that the 3rd column and 3rd row have empty cell values. What I need to do is truncate this 4×4 cell of the one row and column of empty cells so the output is a 3×3 matrix.
Here’s what I start with:
And here’s my desired output:
What do I need to change in my code?
Thanks for reading!I have a cell with some data that has empty cells in the array. Please disregard how ‘number_cell’ is made, it’s purely for example so readers have something to work with. In reality, I am receiving data that has empty rows and columns. I have no control over that.
number_cell = cell(4,4);
number_cell(1,1) = num2cell(1);
number_cell(1,2) = num2cell(2);
number_cell(1,4) = num2cell(3);
number_cell(2,1) = num2cell(7);
number_cell(2,2) = num2cell(8);
number_cell(2,4) = num2cell(9);
number_cell(4,1) = num2cell(14);
number_cell(4,2) = num2cell(15);
number_cell(4,4) = num2cell(17);
updated_cell = number_cell(~cellfun(‘isempty’,number_cell)) ; %I’ve tried playing with this to no avail.
The issue I have is that the 3rd column and 3rd row have empty cell values. What I need to do is truncate this 4×4 cell of the one row and column of empty cells so the output is a 3×3 matrix.
Here’s what I start with:
And here’s my desired output:
What do I need to change in my code?
Thanks for reading! I have a cell with some data that has empty cells in the array. Please disregard how ‘number_cell’ is made, it’s purely for example so readers have something to work with. In reality, I am receiving data that has empty rows and columns. I have no control over that.
number_cell = cell(4,4);
number_cell(1,1) = num2cell(1);
number_cell(1,2) = num2cell(2);
number_cell(1,4) = num2cell(3);
number_cell(2,1) = num2cell(7);
number_cell(2,2) = num2cell(8);
number_cell(2,4) = num2cell(9);
number_cell(4,1) = num2cell(14);
number_cell(4,2) = num2cell(15);
number_cell(4,4) = num2cell(17);
updated_cell = number_cell(~cellfun(‘isempty’,number_cell)) ; %I’ve tried playing with this to no avail.
The issue I have is that the 3rd column and 3rd row have empty cell values. What I need to do is truncate this 4×4 cell of the one row and column of empty cells so the output is a 3×3 matrix.
Here’s what I start with:
And here’s my desired output:
What do I need to change in my code?
Thanks for reading! cell, truncate, matlab MATLAB Answers — New Questions
How can I move the find & replace window or get it to automatically close
The find window gets in the wayThe find window gets in the way The find window gets in the way find window MATLAB Answers — New Questions
how can i expose an AC electrical out of subsystem
hy guys, i am working on a project, peak shaving with BESS, i want to use Hybrid renewable energy system(wind and pv) i need a help on how to go about it, i am having problem in designing of the wind plant and how to export the three phase AC output out of the susbystem.hy guys, i am working on a project, peak shaving with BESS, i want to use Hybrid renewable energy system(wind and pv) i need a help on how to go about it, i am having problem in designing of the wind plant and how to export the three phase AC output out of the susbystem. hy guys, i am working on a project, peak shaving with BESS, i want to use Hybrid renewable energy system(wind and pv) i need a help on how to go about it, i am having problem in designing of the wind plant and how to export the three phase AC output out of the susbystem. simulink, model MATLAB Answers — New Questions
App Desinger: How to access Labels/Spinners via “Tags” in a custom UI component?
I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck.I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck. I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck. customuicomponent, matlab.ui.componentcontainer.componentcontainer, tags MATLAB Answers — New Questions
How can we plot the same time history plot two times but the second time with a time delay of 2 sec?
How can we plot the same time history plot two times but the second time with a time delay of 2 sec?How can we plot the same time history plot two times but the second time with a time delay of 2 sec? How can we plot the same time history plot two times but the second time with a time delay of 2 sec? time history with a delay MATLAB Answers — New Questions
Mixing subscripts with linear indices
Generally speaking, I have found that it has always been possible to mix subscript and linear array indexing with any n-dimensional array, as long as it is in the form,
A(subscript_1,subscript_2,…,subscript_n, linear_index).
For example, given,
A = reshape((1:24)*3, [4, 3, 2]);
all of the following are valid ways of indexing the final element in A,
A(4,3,2)
A(4,6)
A(24)
However, I haven’t been able to find documentation of this, except of course for the trivial case where n=0. Is it officially supported behavior?Generally speaking, I have found that it has always been possible to mix subscript and linear array indexing with any n-dimensional array, as long as it is in the form,
A(subscript_1,subscript_2,…,subscript_n, linear_index).
For example, given,
A = reshape((1:24)*3, [4, 3, 2]);
all of the following are valid ways of indexing the final element in A,
A(4,3,2)
A(4,6)
A(24)
However, I haven’t been able to find documentation of this, except of course for the trivial case where n=0. Is it officially supported behavior? Generally speaking, I have found that it has always been possible to mix subscript and linear array indexing with any n-dimensional array, as long as it is in the form,
A(subscript_1,subscript_2,…,subscript_n, linear_index).
For example, given,
A = reshape((1:24)*3, [4, 3, 2]);
all of the following are valid ways of indexing the final element in A,
A(4,3,2)
A(4,6)
A(24)
However, I haven’t been able to find documentation of this, except of course for the trivial case where n=0. Is it officially supported behavior? indexing, linear, subscripts, undocumented MATLAB Answers — New Questions
Is it possible to perform real-time low-pass filtering on the data received from the USRP X310 in Matlab
I do low-pass filtering on the received data from the X310, and find this step will slow down the processing speed.
Can implement filtering in the parallel way?
Can I do other demodulation steps parallelly in Matlab?
Thanks,
AlfredI do low-pass filtering on the received data from the X310, and find this step will slow down the processing speed.
Can implement filtering in the parallel way?
Can I do other demodulation steps parallelly in Matlab?
Thanks,
Alfred I do low-pass filtering on the received data from the X310, and find this step will slow down the processing speed.
Can implement filtering in the parallel way?
Can I do other demodulation steps parallelly in Matlab?
Thanks,
Alfred usrp, x310 MATLAB Answers — New Questions
Do I have to own the toolboxes used in Matlab Academy courses?
I’m getting an error running the Control Systems Modeling Essentials due to not having Simscape. I didn’t see this listed as a requirement for the course before purchasing Matlab Academy. Is this intentional, or a technical issue with my account?I’m getting an error running the Control Systems Modeling Essentials due to not having Simscape. I didn’t see this listed as a requirement for the course before purchasing Matlab Academy. Is this intentional, or a technical issue with my account? I’m getting an error running the Control Systems Modeling Essentials due to not having Simscape. I didn’t see this listed as a requirement for the course before purchasing Matlab Academy. Is this intentional, or a technical issue with my account? training MATLAB Answers — New Questions
Comparing classification performance using Friedman Test
I am trying to compare the performance of three classifiers across four performance metrics using the Friedman test in MATLAB. Since MATLAB does not include a built-in Nemenyi post-hoc test, I used the "multcompare" function as suggested in related discussions. I obtained the following results. If I understand correctly, a high p-value indicates that there is no significant difference between the classifier performances. How should I interpret the values in c and m? Am I doing something wrong? Can Pearson’s r be used to compare the classifiers instead of Friedman and other post-hoc test? Thanks for the help.
PrfMat = [0.9352 0.9697 0.7475 0.9877;
0.9670 0.8713 0.8414 0.7052;
0.6944 0.6841 0.9851 0.9897];
[p,~,stats] = friedman(PrfMat, 1, ‘on’)
[c,m] = multcompare(stats, ‘CType’, ‘tukey-kramer’)
p = 0.8013
c = 1.0000 2.0000 -2.3747 0.3333 3.0413 0.9891
1.0000 3.0000 -2.0413 0.6667 3.3747 0.9216
1.0000 4.0000 -3.0413 -0.3333 2.3747 0.9891
2.0000 3.0000 -2.3747 0.3333 3.0413 0.9891
2.0000 4.0000 -3.3747 -0.6667 2.0413 0.9216
3.0000 4.0000 -3.7080 -1.0000 1.7080 0.7785
m = 2.6667 0.7454
2.3333 0.7454
2.0000 0.7454
3.0000 0.7454I am trying to compare the performance of three classifiers across four performance metrics using the Friedman test in MATLAB. Since MATLAB does not include a built-in Nemenyi post-hoc test, I used the "multcompare" function as suggested in related discussions. I obtained the following results. If I understand correctly, a high p-value indicates that there is no significant difference between the classifier performances. How should I interpret the values in c and m? Am I doing something wrong? Can Pearson’s r be used to compare the classifiers instead of Friedman and other post-hoc test? Thanks for the help.
PrfMat = [0.9352 0.9697 0.7475 0.9877;
0.9670 0.8713 0.8414 0.7052;
0.6944 0.6841 0.9851 0.9897];
[p,~,stats] = friedman(PrfMat, 1, ‘on’)
[c,m] = multcompare(stats, ‘CType’, ‘tukey-kramer’)
p = 0.8013
c = 1.0000 2.0000 -2.3747 0.3333 3.0413 0.9891
1.0000 3.0000 -2.0413 0.6667 3.3747 0.9216
1.0000 4.0000 -3.0413 -0.3333 2.3747 0.9891
2.0000 3.0000 -2.3747 0.3333 3.0413 0.9891
2.0000 4.0000 -3.3747 -0.6667 2.0413 0.9216
3.0000 4.0000 -3.7080 -1.0000 1.7080 0.7785
m = 2.6667 0.7454
2.3333 0.7454
2.0000 0.7454
3.0000 0.7454 I am trying to compare the performance of three classifiers across four performance metrics using the Friedman test in MATLAB. Since MATLAB does not include a built-in Nemenyi post-hoc test, I used the "multcompare" function as suggested in related discussions. I obtained the following results. If I understand correctly, a high p-value indicates that there is no significant difference between the classifier performances. How should I interpret the values in c and m? Am I doing something wrong? Can Pearson’s r be used to compare the classifiers instead of Friedman and other post-hoc test? Thanks for the help.
PrfMat = [0.9352 0.9697 0.7475 0.9877;
0.9670 0.8713 0.8414 0.7052;
0.6944 0.6841 0.9851 0.9897];
[p,~,stats] = friedman(PrfMat, 1, ‘on’)
[c,m] = multcompare(stats, ‘CType’, ‘tukey-kramer’)
p = 0.8013
c = 1.0000 2.0000 -2.3747 0.3333 3.0413 0.9891
1.0000 3.0000 -2.0413 0.6667 3.3747 0.9216
1.0000 4.0000 -3.0413 -0.3333 2.3747 0.9891
2.0000 3.0000 -2.3747 0.3333 3.0413 0.9891
2.0000 4.0000 -3.3747 -0.6667 2.0413 0.9216
3.0000 4.0000 -3.7080 -1.0000 1.7080 0.7785
m = 2.6667 0.7454
2.3333 0.7454
2.0000 0.7454
3.0000 0.7454 classification, friedman MATLAB Answers — New Questions
How do I import an audio file into simulink?
I’m currently attempting to test a digital filter in simulink, but I do not know how to import my test audio into Simulink.
I recorded a .wav file on my computer and I need a way to add it to my simulation. From my understanding, simulink cannot read a wav file directly, so I need a way to convert it into a format that can be worked with. I repeatedly attempted to use the Playback block to load it but it did not find the .wav file in the directory despite it being my current folder.
In the simulation, it will have noise added to it, then pass through my filter which hopefully removes the noise. I used the filter design app in MATLAB and exported the filter to Simulink, so while it is not necessary for me to do it all in Simulink, it would be convenient.
I also need to be able to convert the output data back into a .wav file so I can listen to it again. I’m not sure if it is relevant, but the filter has a 8kHz sample rate.I’m currently attempting to test a digital filter in simulink, but I do not know how to import my test audio into Simulink.
I recorded a .wav file on my computer and I need a way to add it to my simulation. From my understanding, simulink cannot read a wav file directly, so I need a way to convert it into a format that can be worked with. I repeatedly attempted to use the Playback block to load it but it did not find the .wav file in the directory despite it being my current folder.
In the simulation, it will have noise added to it, then pass through my filter which hopefully removes the noise. I used the filter design app in MATLAB and exported the filter to Simulink, so while it is not necessary for me to do it all in Simulink, it would be convenient.
I also need to be able to convert the output data back into a .wav file so I can listen to it again. I’m not sure if it is relevant, but the filter has a 8kHz sample rate. I’m currently attempting to test a digital filter in simulink, but I do not know how to import my test audio into Simulink.
I recorded a .wav file on my computer and I need a way to add it to my simulation. From my understanding, simulink cannot read a wav file directly, so I need a way to convert it into a format that can be worked with. I repeatedly attempted to use the Playback block to load it but it did not find the .wav file in the directory despite it being my current folder.
In the simulation, it will have noise added to it, then pass through my filter which hopefully removes the noise. I used the filter design app in MATLAB and exported the filter to Simulink, so while it is not necessary for me to do it all in Simulink, it would be convenient.
I also need to be able to convert the output data back into a .wav file so I can listen to it again. I’m not sure if it is relevant, but the filter has a 8kHz sample rate. audio processing, digital signal processing, digital filters, simulink MATLAB Answers — New Questions
When exporting a triangulation as an stl using stlwrite() the resulting stl is missing half of its faces.
I get an output file looking like the following picture when trying to export my triangulation object as an stl. the yellow represents valid faces and the red corresponds to missing faces. The section of code where I generate the face connectivity and convert to a triangulation object and subsequently an stl file.
Each "loadpath" (wiggly strand connecting one rectangle to the other) is defined in 2-d by a set of 2 1001 point curves, and in 3-d by a simple upwards translation of those curves. The matrix containing my points starts with 4 points defining the -z corners of the -x grip stock (rectangular section), followed by the +y and -y curves defining each of the loadpaths on the -z face of the object, then the 4 points defining the -z corners of the +x grip stock, the 4 points defining the +z corners of the -x grip stock, the upper loadpaths, and finally the 4 corners defining the +z corners of the +x grip stock.
% Generating tringular tiling of the loadpaths
f=zeros(3,2001*10*4);
for i=1:1000 % first loadpath
f(:,i)=[i,i+1,1001+i]; %y+ layer of triangles on bottom face
f(:,1000+i)=[i+1,1001+i,1002+i]; %y- layer of triangles on bottom face
f(:,20000+i)=[i,i+1,20028+i]; %z- layer of triangles on y+ face
f(:,21000+i)=[i+1,20028+i,20029+i]; %z+ layer of tringles on y+ face
f(:,40000+i)=[1001+i,1002+i,21029+i];
f(:,41000+i)=[1002+i,21029+i,21030+i];
f(:,60000+i)=[20028+i,20029+i,21029+i];
f(:,61000+i)=[20029+i,21029+i,21030+i];
end
for i=1:9 % loadpaths 2-10
f(:,((2000*i)+1):((2000*(i+1))))=f(:,1:2000)+2002*i;
f(:,((2000*i)+20000+1):(2000*(i+1)+20000))=f(:,20001:22000)+2002*i;
f(:,((2000*i)+40000+1):(2000*(i+1)+40000))=f(:,40001:42000)+2002*i;
f(:,((2000*i)+60000+1):(2000*(i+1)+60000))=f(:,60001:62000)+2002*i;
% faces between the loadpaths
f(:,i+80000)=[((i-.5)*2002)+1,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80009)=[((i)*2002)+20029,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80018)=f(:,i+80000)+1000;
f(:,i+80027)=f(:,i+80009)+1000;
end
f=f+4; % adjusting point indicies to reflect the first 4 points being used for grip stock
% generating grip stock and loadpath attachment points
f(:,80037)=[1,2,3]; % bottom face -x gs -x,-y triangle (third angle proj.)
f(:,80038)=[2,3,4]; % bottom face -x gs +x,+y triangle
f(:,80039)=[1,2,20029]; % left face -x gs -y,-z triangle
f(:,80040)=[1,3,20029]; % front face -x gs -x,-z triangle
f(:,80041)=[2,20030,20029]; % left face -x gs, +y,+z triangle
f(:,80042)=[2,4,20030]; % back face -x gs, -x,-z triangle
f(:,80043)=[4,20032,20030]; % back face -x gs, +x,+z triangle
f(:,80044)=[3,20031,20029]; % front face -x gs, +x,+z triangle
f(:,80045:80046)=[f(:,80037),f(:,80038)]+20028; % top face +x gs, both triangles
f(:,80047:80056)=f(:,80037:80046)+20024; % +x gs, all triangles
% attaching grip stock to first and last loadpaths.
f(:,80057)=[4,5,20032];
f(:,80058)=[5,20032,20033];
f(:,80059)=[20028,1005,21033];
f(:,80060)=[20028,21033,40056];
f(:,80061)=[3,19024,39052];
f(:,80062)=[3,20031,39052];
f(:,80063)=[20024,20027,40055];
f(:,80064)=[40055,40051,20024];
%% converting to triangulation object and stl
tr=triangulation(f’,db’);
%trisurf(tr)
axis ‘equal’
stlwrite(tr, ‘stl_test.stl’)
%patch(‘Faces’,f(:,:)’,’Vertices’,db’,’facecol’,[1,0,0],’edgecol’,’k’);I get an output file looking like the following picture when trying to export my triangulation object as an stl. the yellow represents valid faces and the red corresponds to missing faces. The section of code where I generate the face connectivity and convert to a triangulation object and subsequently an stl file.
Each "loadpath" (wiggly strand connecting one rectangle to the other) is defined in 2-d by a set of 2 1001 point curves, and in 3-d by a simple upwards translation of those curves. The matrix containing my points starts with 4 points defining the -z corners of the -x grip stock (rectangular section), followed by the +y and -y curves defining each of the loadpaths on the -z face of the object, then the 4 points defining the -z corners of the +x grip stock, the 4 points defining the +z corners of the -x grip stock, the upper loadpaths, and finally the 4 corners defining the +z corners of the +x grip stock.
% Generating tringular tiling of the loadpaths
f=zeros(3,2001*10*4);
for i=1:1000 % first loadpath
f(:,i)=[i,i+1,1001+i]; %y+ layer of triangles on bottom face
f(:,1000+i)=[i+1,1001+i,1002+i]; %y- layer of triangles on bottom face
f(:,20000+i)=[i,i+1,20028+i]; %z- layer of triangles on y+ face
f(:,21000+i)=[i+1,20028+i,20029+i]; %z+ layer of tringles on y+ face
f(:,40000+i)=[1001+i,1002+i,21029+i];
f(:,41000+i)=[1002+i,21029+i,21030+i];
f(:,60000+i)=[20028+i,20029+i,21029+i];
f(:,61000+i)=[20029+i,21029+i,21030+i];
end
for i=1:9 % loadpaths 2-10
f(:,((2000*i)+1):((2000*(i+1))))=f(:,1:2000)+2002*i;
f(:,((2000*i)+20000+1):(2000*(i+1)+20000))=f(:,20001:22000)+2002*i;
f(:,((2000*i)+40000+1):(2000*(i+1)+40000))=f(:,40001:42000)+2002*i;
f(:,((2000*i)+60000+1):(2000*(i+1)+60000))=f(:,60001:62000)+2002*i;
% faces between the loadpaths
f(:,i+80000)=[((i-.5)*2002)+1,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80009)=[((i)*2002)+20029,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80018)=f(:,i+80000)+1000;
f(:,i+80027)=f(:,i+80009)+1000;
end
f=f+4; % adjusting point indicies to reflect the first 4 points being used for grip stock
% generating grip stock and loadpath attachment points
f(:,80037)=[1,2,3]; % bottom face -x gs -x,-y triangle (third angle proj.)
f(:,80038)=[2,3,4]; % bottom face -x gs +x,+y triangle
f(:,80039)=[1,2,20029]; % left face -x gs -y,-z triangle
f(:,80040)=[1,3,20029]; % front face -x gs -x,-z triangle
f(:,80041)=[2,20030,20029]; % left face -x gs, +y,+z triangle
f(:,80042)=[2,4,20030]; % back face -x gs, -x,-z triangle
f(:,80043)=[4,20032,20030]; % back face -x gs, +x,+z triangle
f(:,80044)=[3,20031,20029]; % front face -x gs, +x,+z triangle
f(:,80045:80046)=[f(:,80037),f(:,80038)]+20028; % top face +x gs, both triangles
f(:,80047:80056)=f(:,80037:80046)+20024; % +x gs, all triangles
% attaching grip stock to first and last loadpaths.
f(:,80057)=[4,5,20032];
f(:,80058)=[5,20032,20033];
f(:,80059)=[20028,1005,21033];
f(:,80060)=[20028,21033,40056];
f(:,80061)=[3,19024,39052];
f(:,80062)=[3,20031,39052];
f(:,80063)=[20024,20027,40055];
f(:,80064)=[40055,40051,20024];
%% converting to triangulation object and stl
tr=triangulation(f’,db’);
%trisurf(tr)
axis ‘equal’
stlwrite(tr, ‘stl_test.stl’)
%patch(‘Faces’,f(:,:)’,’Vertices’,db’,’facecol’,[1,0,0],’edgecol’,’k’); I get an output file looking like the following picture when trying to export my triangulation object as an stl. the yellow represents valid faces and the red corresponds to missing faces. The section of code where I generate the face connectivity and convert to a triangulation object and subsequently an stl file.
Each "loadpath" (wiggly strand connecting one rectangle to the other) is defined in 2-d by a set of 2 1001 point curves, and in 3-d by a simple upwards translation of those curves. The matrix containing my points starts with 4 points defining the -z corners of the -x grip stock (rectangular section), followed by the +y and -y curves defining each of the loadpaths on the -z face of the object, then the 4 points defining the -z corners of the +x grip stock, the 4 points defining the +z corners of the -x grip stock, the upper loadpaths, and finally the 4 corners defining the +z corners of the +x grip stock.
% Generating tringular tiling of the loadpaths
f=zeros(3,2001*10*4);
for i=1:1000 % first loadpath
f(:,i)=[i,i+1,1001+i]; %y+ layer of triangles on bottom face
f(:,1000+i)=[i+1,1001+i,1002+i]; %y- layer of triangles on bottom face
f(:,20000+i)=[i,i+1,20028+i]; %z- layer of triangles on y+ face
f(:,21000+i)=[i+1,20028+i,20029+i]; %z+ layer of tringles on y+ face
f(:,40000+i)=[1001+i,1002+i,21029+i];
f(:,41000+i)=[1002+i,21029+i,21030+i];
f(:,60000+i)=[20028+i,20029+i,21029+i];
f(:,61000+i)=[20029+i,21029+i,21030+i];
end
for i=1:9 % loadpaths 2-10
f(:,((2000*i)+1):((2000*(i+1))))=f(:,1:2000)+2002*i;
f(:,((2000*i)+20000+1):(2000*(i+1)+20000))=f(:,20001:22000)+2002*i;
f(:,((2000*i)+40000+1):(2000*(i+1)+40000))=f(:,40001:42000)+2002*i;
f(:,((2000*i)+60000+1):(2000*(i+1)+60000))=f(:,60001:62000)+2002*i;
% faces between the loadpaths
f(:,i+80000)=[((i-.5)*2002)+1,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80009)=[((i)*2002)+20029,((i)*2002)+1,(i-.5)*2002+20029];
f(:,i+80018)=f(:,i+80000)+1000;
f(:,i+80027)=f(:,i+80009)+1000;
end
f=f+4; % adjusting point indicies to reflect the first 4 points being used for grip stock
% generating grip stock and loadpath attachment points
f(:,80037)=[1,2,3]; % bottom face -x gs -x,-y triangle (third angle proj.)
f(:,80038)=[2,3,4]; % bottom face -x gs +x,+y triangle
f(:,80039)=[1,2,20029]; % left face -x gs -y,-z triangle
f(:,80040)=[1,3,20029]; % front face -x gs -x,-z triangle
f(:,80041)=[2,20030,20029]; % left face -x gs, +y,+z triangle
f(:,80042)=[2,4,20030]; % back face -x gs, -x,-z triangle
f(:,80043)=[4,20032,20030]; % back face -x gs, +x,+z triangle
f(:,80044)=[3,20031,20029]; % front face -x gs, +x,+z triangle
f(:,80045:80046)=[f(:,80037),f(:,80038)]+20028; % top face +x gs, both triangles
f(:,80047:80056)=f(:,80037:80046)+20024; % +x gs, all triangles
% attaching grip stock to first and last loadpaths.
f(:,80057)=[4,5,20032];
f(:,80058)=[5,20032,20033];
f(:,80059)=[20028,1005,21033];
f(:,80060)=[20028,21033,40056];
f(:,80061)=[3,19024,39052];
f(:,80062)=[3,20031,39052];
f(:,80063)=[20024,20027,40055];
f(:,80064)=[40055,40051,20024];
%% converting to triangulation object and stl
tr=triangulation(f’,db’);
%trisurf(tr)
axis ‘equal’
stlwrite(tr, ‘stl_test.stl’)
%patch(‘Faces’,f(:,:)’,’Vertices’,db’,’facecol’,[1,0,0],’edgecol’,’k’); stl, triangulation MATLAB Answers — New Questions
Why my push-pull is giving 0 V?
Hi,
I am designing a push-pull converter. I copied the control from this example after having tried the control that was in another example made by a user. However, that one wasn’t giving a correct closed-loop answer as it was giving an input of 0 to the gates while the output voltage was stable. So someone suggested me to see the example from the first link and now that control is making the output voltage to be 0 V. The control is as shown below:
As you can see, my reference voltage is 350 V and the switching frequency is 50000 Hz. My input voltage is 137.14 V because it will come from another stage that will give at most an output voltage of 137.14 V. It doesn’t even work with this control in open-loop when I connect a constant value of 0.159 to the gain of 0.5 and the PI and comparison of the left is not connected.
I know that in a push-pull the transistors conduct the same time but not simultaneously a maximum of 50% each, but could someone explain me how this control ensures this and why is not working for me?
I see that the left transistor is not switching by looking at the waveforms:
The gate_L waveform is the top right one and the top left is for the output voltage.
Also, these are the values I have in the multi-winding transformer (no taps) as I am using the black blocks and not the blue as in the example:
The push-pull looks like this:
Thanks.
CarlosHi,
I am designing a push-pull converter. I copied the control from this example after having tried the control that was in another example made by a user. However, that one wasn’t giving a correct closed-loop answer as it was giving an input of 0 to the gates while the output voltage was stable. So someone suggested me to see the example from the first link and now that control is making the output voltage to be 0 V. The control is as shown below:
As you can see, my reference voltage is 350 V and the switching frequency is 50000 Hz. My input voltage is 137.14 V because it will come from another stage that will give at most an output voltage of 137.14 V. It doesn’t even work with this control in open-loop when I connect a constant value of 0.159 to the gain of 0.5 and the PI and comparison of the left is not connected.
I know that in a push-pull the transistors conduct the same time but not simultaneously a maximum of 50% each, but could someone explain me how this control ensures this and why is not working for me?
I see that the left transistor is not switching by looking at the waveforms:
The gate_L waveform is the top right one and the top left is for the output voltage.
Also, these are the values I have in the multi-winding transformer (no taps) as I am using the black blocks and not the blue as in the example:
The push-pull looks like this:
Thanks.
Carlos Hi,
I am designing a push-pull converter. I copied the control from this example after having tried the control that was in another example made by a user. However, that one wasn’t giving a correct closed-loop answer as it was giving an input of 0 to the gates while the output voltage was stable. So someone suggested me to see the example from the first link and now that control is making the output voltage to be 0 V. The control is as shown below:
As you can see, my reference voltage is 350 V and the switching frequency is 50000 Hz. My input voltage is 137.14 V because it will come from another stage that will give at most an output voltage of 137.14 V. It doesn’t even work with this control in open-loop when I connect a constant value of 0.159 to the gain of 0.5 and the PI and comparison of the left is not connected.
I know that in a push-pull the transistors conduct the same time but not simultaneously a maximum of 50% each, but could someone explain me how this control ensures this and why is not working for me?
I see that the left transistor is not switching by looking at the waveforms:
The gate_L waveform is the top right one and the top left is for the output voltage.
Also, these are the values I have in the multi-winding transformer (no taps) as I am using the black blocks and not the blue as in the example:
The push-pull looks like this:
Thanks.
Carlos push-pull converter, power_electronics_control, power_conversion_control, simulink, pi controller MATLAB Answers — New Questions
MATLAB 2025: Why can’t I close a figure using Mac keyboard shortcuts?
I just downloaded MATLAB 2025a and all is working well so far except a strange quirk: There is no easy way to close a figure window using standard Mac keyboard shortcuts.
In previous versions, I can close a figure window by pressing the standard Cmd+w. This keyboard shortcut is used across Mac to close windows, browser tabs, documents, etc. Its a very generic keystroke and not in the list of MATLAB-specific keyboard shortcuts.
It’s very bizarre because literally all other generic Mac keyboard shortcuts still work fine in MATLAB 2025, even when applied to figure windows. For example, I can minimize the figure window using Cmd+m. I can also toggle between figure windows using Cmd+`. So other Mac keyboard shortcuts apply to figures fine.
Adding to the mystery, I can still use the exact same Cmd+w keyboard shortcut to close an m file that is open in the editor. So the Cmd+w shortcut is recognized within MATLAB 2025. But does not work to close a figure.
Maybe its just me being nitpicky, but its really annoying because I use a lot of keyboard shortcuts in my work. Currently the only alternative is to reach all the way to my mouse and move the mouse to the x and click to close the figure, or I have to type "close" in the command window. Each of these takes at least 10x longer than hitting Cmd+w to quickly close a single figure.
Anyone else experiecing this? Any fix?I just downloaded MATLAB 2025a and all is working well so far except a strange quirk: There is no easy way to close a figure window using standard Mac keyboard shortcuts.
In previous versions, I can close a figure window by pressing the standard Cmd+w. This keyboard shortcut is used across Mac to close windows, browser tabs, documents, etc. Its a very generic keystroke and not in the list of MATLAB-specific keyboard shortcuts.
It’s very bizarre because literally all other generic Mac keyboard shortcuts still work fine in MATLAB 2025, even when applied to figure windows. For example, I can minimize the figure window using Cmd+m. I can also toggle between figure windows using Cmd+`. So other Mac keyboard shortcuts apply to figures fine.
Adding to the mystery, I can still use the exact same Cmd+w keyboard shortcut to close an m file that is open in the editor. So the Cmd+w shortcut is recognized within MATLAB 2025. But does not work to close a figure.
Maybe its just me being nitpicky, but its really annoying because I use a lot of keyboard shortcuts in my work. Currently the only alternative is to reach all the way to my mouse and move the mouse to the x and click to close the figure, or I have to type "close" in the command window. Each of these takes at least 10x longer than hitting Cmd+w to quickly close a single figure.
Anyone else experiecing this? Any fix? I just downloaded MATLAB 2025a and all is working well so far except a strange quirk: There is no easy way to close a figure window using standard Mac keyboard shortcuts.
In previous versions, I can close a figure window by pressing the standard Cmd+w. This keyboard shortcut is used across Mac to close windows, browser tabs, documents, etc. Its a very generic keystroke and not in the list of MATLAB-specific keyboard shortcuts.
It’s very bizarre because literally all other generic Mac keyboard shortcuts still work fine in MATLAB 2025, even when applied to figure windows. For example, I can minimize the figure window using Cmd+m. I can also toggle between figure windows using Cmd+`. So other Mac keyboard shortcuts apply to figures fine.
Adding to the mystery, I can still use the exact same Cmd+w keyboard shortcut to close an m file that is open in the editor. So the Cmd+w shortcut is recognized within MATLAB 2025. But does not work to close a figure.
Maybe its just me being nitpicky, but its really annoying because I use a lot of keyboard shortcuts in my work. Currently the only alternative is to reach all the way to my mouse and move the mouse to the x and click to close the figure, or I have to type "close" in the command window. Each of these takes at least 10x longer than hitting Cmd+w to quickly close a single figure.
Anyone else experiecing this? Any fix? figure, mac, matlab MATLAB Answers — New Questions
Example Does Not Work
I try to run the example. The second line of code workerToClient = parallel.pool.PollableDataQueue(Destination="any") gives me this error:
Error using parallel.pool.PollableDataQueue (line 28)
Too many input arguments.
I remove the Destination = "any" argument and that seems to get things working. But then I get to the for-loop in the example:
for idx = 1:5
send(clientToWorker, [idx rand]);
status = poll(workerToClient, inf)
end
and the computer locks up with no output. I force-quite (CTRL-C) and type
future.State
The result is ‘finished’. It seems the process stopped and I never sent the stop message. Seems nothing I can do will keep the process running.I try to run the example. The second line of code workerToClient = parallel.pool.PollableDataQueue(Destination="any") gives me this error:
Error using parallel.pool.PollableDataQueue (line 28)
Too many input arguments.
I remove the Destination = "any" argument and that seems to get things working. But then I get to the for-loop in the example:
for idx = 1:5
send(clientToWorker, [idx rand]);
status = poll(workerToClient, inf)
end
and the computer locks up with no output. I force-quite (CTRL-C) and type
future.State
The result is ‘finished’. It seems the process stopped and I never sent the stop message. Seems nothing I can do will keep the process running. I try to run the example. The second line of code workerToClient = parallel.pool.PollableDataQueue(Destination="any") gives me this error:
Error using parallel.pool.PollableDataQueue (line 28)
Too many input arguments.
I remove the Destination = "any" argument and that seems to get things working. But then I get to the for-loop in the example:
for idx = 1:5
send(clientToWorker, [idx rand]);
status = poll(workerToClient, inf)
end
and the computer locks up with no output. I force-quite (CTRL-C) and type
future.State
The result is ‘finished’. It seems the process stopped and I never sent the stop message. Seems nothing I can do will keep the process running. parallel computing, pollabledataqueue MATLAB Answers — New Questions
Error when I want to open files
When I want to open a file from my computer (I want to open a matlab file) I get the following error:
Exception in thread "AWT-EventQueue-0": com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.util.MissingResourceException: Can’t find bundle for base name SLDD:sldd, locale sr_RS
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:899)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getMessageCatalogString(SLDDFileExtensionFilterContributor.java:46)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getDialogFilters(SLDDFileExtensionFilterContributor.java:31)
at com.mathworks.mwswing.FileExtensionFilterUtils.sortFileExtensionFilters(FileExtensionFilterUtils.java:109)
at com.mathworks.mwswing.FileExtensionFilterUtils.getFileExtensionFilters(FileExtensionFilterUtils.java:96)
at com.mathworks.mde.desk.MLDesktop.showOpenDialog(MLDesktop.java:2999)
at com.mathworks.mde.desk.MLDesktop$OpenAction.actionPerformed(MLDesktop.java:2994)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at com.mathworks.toolstrip.factory.TSFactory$ListListenerBridge.listItemSelected(TSFactory.java:1555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:72)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: fl:i18n:MwLcInvLcName
at com.mathworks.fl.i18n.XMLMessageSystemJNI.nativeLoadMessageCatalog(Native Method)
at com.mathworks.fl.i18n.XMLResourceBundleControl$XMLResourceBundle.<init>(Unknown Source)
at com.mathworks.fl.i18n.XMLResourceBundleControl.newBundle(Unknown Source)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1518)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1482)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1370)
… 50 more
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:85)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)When I want to open a file from my computer (I want to open a matlab file) I get the following error:
Exception in thread "AWT-EventQueue-0": com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.util.MissingResourceException: Can’t find bundle for base name SLDD:sldd, locale sr_RS
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:899)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getMessageCatalogString(SLDDFileExtensionFilterContributor.java:46)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getDialogFilters(SLDDFileExtensionFilterContributor.java:31)
at com.mathworks.mwswing.FileExtensionFilterUtils.sortFileExtensionFilters(FileExtensionFilterUtils.java:109)
at com.mathworks.mwswing.FileExtensionFilterUtils.getFileExtensionFilters(FileExtensionFilterUtils.java:96)
at com.mathworks.mde.desk.MLDesktop.showOpenDialog(MLDesktop.java:2999)
at com.mathworks.mde.desk.MLDesktop$OpenAction.actionPerformed(MLDesktop.java:2994)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at com.mathworks.toolstrip.factory.TSFactory$ListListenerBridge.listItemSelected(TSFactory.java:1555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:72)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: fl:i18n:MwLcInvLcName
at com.mathworks.fl.i18n.XMLMessageSystemJNI.nativeLoadMessageCatalog(Native Method)
at com.mathworks.fl.i18n.XMLResourceBundleControl$XMLResourceBundle.<init>(Unknown Source)
at com.mathworks.fl.i18n.XMLResourceBundleControl.newBundle(Unknown Source)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1518)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1482)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1370)
… 50 more
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:85)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) When I want to open a file from my computer (I want to open a matlab file) I get the following error:
Exception in thread "AWT-EventQueue-0": com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.util.MissingResourceException: Can’t find bundle for base name SLDD:sldd, locale sr_RS
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:899)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.fl.i18n.XMLMessageSystem.getBundle(Unknown Source)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getMessageCatalogString(SLDDFileExtensionFilterContributor.java:46)
at com.mathworks.toolbox.simulink.datadictionary.desktopintegration.SLDDFileExtensionFilterContributor.getDialogFilters(SLDDFileExtensionFilterContributor.java:31)
at com.mathworks.mwswing.FileExtensionFilterUtils.sortFileExtensionFilters(FileExtensionFilterUtils.java:109)
at com.mathworks.mwswing.FileExtensionFilterUtils.getFileExtensionFilters(FileExtensionFilterUtils.java:96)
at com.mathworks.mde.desk.MLDesktop.showOpenDialog(MLDesktop.java:2999)
at com.mathworks.mde.desk.MLDesktop$OpenAction.actionPerformed(MLDesktop.java:2994)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at com.mathworks.toolstrip.factory.TSFactory$ListListenerBridge.listItemSelected(TSFactory.java:1555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:72)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: fl:i18n:MwLcInvLcName
at com.mathworks.fl.i18n.XMLMessageSystemJNI.nativeLoadMessageCatalog(Native Method)
at com.mathworks.fl.i18n.XMLResourceBundleControl$XMLResourceBundle.<init>(Unknown Source)
at com.mathworks.fl.i18n.XMLResourceBundleControl.newBundle(Unknown Source)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1518)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1482)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1370)
… 50 more
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:85)
at com.sun.proxy.$Proxy11.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) opening files, matlab, java, error MATLAB Answers — New Questions
Error using scatteredInterpolant Sample values must be a double array.
Dear all,
I use griddata to interpolate one 2D data. The codes worked quite well half a year. But since today, it always showed an error "Error using scatteredInterpolant. Sample values must be a double array."
Can anyone do me a favor. Thanks a lot.Dear all,
I use griddata to interpolate one 2D data. The codes worked quite well half a year. But since today, it always showed an error "Error using scatteredInterpolant. Sample values must be a double array."
Can anyone do me a favor. Thanks a lot. Dear all,
I use griddata to interpolate one 2D data. The codes worked quite well half a year. But since today, it always showed an error "Error using scatteredInterpolant. Sample values must be a double array."
Can anyone do me a favor. Thanks a lot. griddata, 2d data MATLAB Answers — New Questions
Sharpening a 2D histogram and finding peaks
Can you help me?
I have a bunch of 2D histograms that I’d like to sharpen so that I can identify some features. Here is an example image:
Each vertical line in the image is a scan (row) in my data and I really want to operate on a per-row basis. The sharpening needs to be primarily in the vertical (value) direction.
I’m trying to identify the center (i.e., median, mode) of the upper and the lower peak for each scan. Any intermediate peaks (for example in scans 3-10) are of lesser interest. Finding the center of the the lower peak is the primary challenge.
I have attached a data file containing the data I used to generate the plot. Here is the plotting code:
function PlotHist(plotData, plotTitle)
figure;
surf(plotData); shading("flat");
xlim([0, 4096]); xticks(0 : 512 : 4096); xlabel("Laser Value");
ylim([0, size(plotData, 1)]); ylabel("Scan");
cb = colorbar; cb.Label.String = ‘# points’;
view([90, -90])
title(plotTitle, Interpreter = ‘none’);
end
I’ve reviewed and tried a number of the Matlab answers on deblurring and sharpening, but I’m struggling to focus my results in the vertical direction.Can you help me?
I have a bunch of 2D histograms that I’d like to sharpen so that I can identify some features. Here is an example image:
Each vertical line in the image is a scan (row) in my data and I really want to operate on a per-row basis. The sharpening needs to be primarily in the vertical (value) direction.
I’m trying to identify the center (i.e., median, mode) of the upper and the lower peak for each scan. Any intermediate peaks (for example in scans 3-10) are of lesser interest. Finding the center of the the lower peak is the primary challenge.
I have attached a data file containing the data I used to generate the plot. Here is the plotting code:
function PlotHist(plotData, plotTitle)
figure;
surf(plotData); shading("flat");
xlim([0, 4096]); xticks(0 : 512 : 4096); xlabel("Laser Value");
ylim([0, size(plotData, 1)]); ylabel("Scan");
cb = colorbar; cb.Label.String = ‘# points’;
view([90, -90])
title(plotTitle, Interpreter = ‘none’);
end
I’ve reviewed and tried a number of the Matlab answers on deblurring and sharpening, but I’m struggling to focus my results in the vertical direction. Can you help me?
I have a bunch of 2D histograms that I’d like to sharpen so that I can identify some features. Here is an example image:
Each vertical line in the image is a scan (row) in my data and I really want to operate on a per-row basis. The sharpening needs to be primarily in the vertical (value) direction.
I’m trying to identify the center (i.e., median, mode) of the upper and the lower peak for each scan. Any intermediate peaks (for example in scans 3-10) are of lesser interest. Finding the center of the the lower peak is the primary challenge.
I have attached a data file containing the data I used to generate the plot. Here is the plotting code:
function PlotHist(plotData, plotTitle)
figure;
surf(plotData); shading("flat");
xlim([0, 4096]); xticks(0 : 512 : 4096); xlabel("Laser Value");
ylim([0, size(plotData, 1)]); ylabel("Scan");
cb = colorbar; cb.Label.String = ‘# points’;
view([90, -90])
title(plotTitle, Interpreter = ‘none’);
end
I’ve reviewed and tried a number of the Matlab answers on deblurring and sharpening, but I’m struggling to focus my results in the vertical direction. 2d histogram, sharpening, peak-finding MATLAB Answers — New Questions
effects of ifft2(x, ‘symmetric’) while x is not conjugate symmetric
Hi all,
I understand that ‘symmetric’ in ifft2 assumes data is conjugate symmetric and will output real values, but I want to know how exactly is this done. Specifically:
with ‘symmetric’, will only half of the data be used or still the whole matrix is used, but just output real values?
if x is not conjugate symmetric but I still pass in ‘symmetric’, what will happen?
Thanks in advance.Hi all,
I understand that ‘symmetric’ in ifft2 assumes data is conjugate symmetric and will output real values, but I want to know how exactly is this done. Specifically:
with ‘symmetric’, will only half of the data be used or still the whole matrix is used, but just output real values?
if x is not conjugate symmetric but I still pass in ‘symmetric’, what will happen?
Thanks in advance. Hi all,
I understand that ‘symmetric’ in ifft2 assumes data is conjugate symmetric and will output real values, but I want to know how exactly is this done. Specifically:
with ‘symmetric’, will only half of the data be used or still the whole matrix is used, but just output real values?
if x is not conjugate symmetric but I still pass in ‘symmetric’, what will happen?
Thanks in advance. fft MATLAB Answers — New Questions









