Author: PuTI
How to debug C# .NET assembly called from MATLAB?
I’m trying to use some .NET assemblies from MATLAB but I am encountering a MATLAB System Error.
I was wondering if there is some additional debug logs I can turn on to see the details of the system error to determine what in my .NET assembly might be causing the crash.I’m trying to use some .NET assemblies from MATLAB but I am encountering a MATLAB System Error.
I was wondering if there is some additional debug logs I can turn on to see the details of the system error to determine what in my .NET assembly might be causing the crash. I’m trying to use some .NET assemblies from MATLAB but I am encountering a MATLAB System Error.
I was wondering if there is some additional debug logs I can turn on to see the details of the system error to determine what in my .NET assembly might be causing the crash. MATLAB Answers — New Questions
How do I set the size of a tile from tiledlayout?
I am producing a number of figures with a different number of tiles from tiledlayout. I’d like to make sure all tiles are the same size across the figures. I have only found options to set the figure size. This is problematic since I have to change the figure size every time the number of tiles changes.I am producing a number of figures with a different number of tiles from tiledlayout. I’d like to make sure all tiles are the same size across the figures. I have only found options to set the figure size. This is problematic since I have to change the figure size every time the number of tiles changes. I am producing a number of figures with a different number of tiles from tiledlayout. I’d like to make sure all tiles are the same size across the figures. I have only found options to set the figure size. This is problematic since I have to change the figure size every time the number of tiles changes. tiledlayout, plotting MATLAB Answers — New Questions
Communicate with worker through client
Hello!
I have an app (app designer/GUIDE) which calls a function that looks something like this
function func()
spmd
switch labindex
case 1
while (true)
% some code…
end
case 2
while (true)
% some code…
end
end
end
end
and I would like to be able to break out of the while loop for each workers of the spmd with a click of a button in the app, which means I have to send data from the client to the workers.
I know I can easily send data from the workers to the client, but I’m not sure about the reverse direction.
Please help, thanks!Hello!
I have an app (app designer/GUIDE) which calls a function that looks something like this
function func()
spmd
switch labindex
case 1
while (true)
% some code…
end
case 2
while (true)
% some code…
end
end
end
end
and I would like to be able to break out of the while loop for each workers of the spmd with a click of a button in the app, which means I have to send data from the client to the workers.
I know I can easily send data from the workers to the client, but I’m not sure about the reverse direction.
Please help, thanks! Hello!
I have an app (app designer/GUIDE) which calls a function that looks something like this
function func()
spmd
switch labindex
case 1
while (true)
% some code…
end
case 2
while (true)
% some code…
end
end
end
end
and I would like to be able to break out of the while loop for each workers of the spmd with a click of a button in the app, which means I have to send data from the client to the workers.
I know I can easily send data from the workers to the client, but I’m not sure about the reverse direction.
Please help, thanks! spmd, worker, parallel computing, app designer, guide, dataqueue MATLAB Answers — New Questions
Find Gaps and Overlaps in Rectangular Prisms
I have rectangular prisms at fixed locations defined below, and I’m trying to see if they fit in a box without any gaps or overlaps. The perfect no-gaps, no-overlaps solution looks like the picture of the attached Jenga tower.
% Fit the following rectangular prisms in a box:
prisms.p1.x = [75 200]; % Min/max of x range for prism p1
prisms.p1.y = [4 100]; % Min/max of y range for prism p1
prisms.p1.z = [1e3 1e4]; % Min/max of z range for prism p1
prisms.p2.x = [20 80];
prisms.p2.y = [0.1 2.2];
prisms.p2.z = [0 1e3];
prisms.p3.x = [80 115];
prisms.p3.y = [0.1 4];
prisms.p3.z = [0 1e3];
prisms.p4.x = [20 180];
prisms.p4.y = [2.2 8];
prisms.p4.z = [0 1e3];
prisms.p5.x = [200 1000];
prisms.p5.y = [0 1];
prisms.p5.z = [0 1e4];
% The box that the prisms must fit in, given the values above, is:
box.x = [20 1000]; % Min/max of x range for the box of prisms
box.y = [0 100]; % Min/max of x range for the box of prisms
box.z = [0 1e4]; % Min/max of x range for the box of prisms
Above is a struct called prisms. It has 5 fields; each field describes one prism (p1,p2,p3,p4,p5) using x,y,z coordinates. I want to identify if the rectangular prisms have any overlaps or gaps between them, and if so, report where those gaps and/or overlaps occur. The ranges are all aligned with the axes, and are always >=0.
The size of the box that the prisms must fit in is defined to be the min and max values over all prisms for a particular axis. If two prisms touch at only one point in their range, I don’t count that as an "overlap". I don’t want to move the prisms, but instead want to report where two prisms overlap, or where there are gaps in the box.
I’ve found all the overlapping regions by testing pairs of rectangular prisms for overlap, and it seems to work:
%% Get all combinations of classes (combinations since order does not matter)
nFields = length(fieldnames(prisms));
combos = nchoosek(1:nFields,2);
nCombos = nchoosek(nFields,2);
% Index the struct by index instead of field name
fns = fieldnames(prisms);
%% Check for overlap between each pair of classes
for ic = 1:nCombos
x11 = prisms.(fns{combos(ic,1)}).x(1);
x12 = prisms.(fns{combos(ic,1)}).x(2);
y11 = prisms.(fns{combos(ic,1)}).y(1);
y12 = prisms.(fns{combos(ic,1)}).y(2);
z11 = prisms.(fns{combos(ic,1)}).z(1);
z12 = prisms.(fns{combos(ic,1)}).z(2);
x21 = prisms.(fns{combos(ic,2)}).x(1);
x22 = prisms.(fns{combos(ic,2)}).x(2);
y21 = prisms.(fns{combos(ic,2)}).y(1);
y22 = prisms.(fns{combos(ic,2)}).y(2);
z21 = prisms.(fns{combos(ic,2)}).z(1);
z22 = prisms.(fns{combos(ic,2)}).z(2);
if( (x12>x21 && y12>y21 && z12>z21) || (x21>x12 && y21>y12 && z21>z12) )
% There is either overlap, or the edge of classes align
% Check for overlap in x
if( ((x12>=x21) && (x11<=x22)) || ((x11<=x22) && (x21<=x21)) )
if((x21==x12) || (x11==x22))
continue;
else
fprintf(‘Overlap in x between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,1)}, x11, x12);
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,2)}, x21, x22);
end
end
% Check for overlap in y
if( ((y12>=y21) && (y11<=y22)) || ((y11<=y22) && (y21<=y21)) )
if((y21==y12) || (y11==y22))
continue;
else
fprintf(‘Overlap in y between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,1)}, y11, y12);
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,2)}, y21, y22);
end
end
% Check for overlap in z
if( ((z12>=z21) && (z11<=z22)) || ((z11<=z22) && (z21<=z21)) )
if((z21==z12) || (z11==z22))
continue;
else
fprintf(‘Overlap in z between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,1)}, z11, z12);
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,2)}, z21, z22);
end
end
end
end
I just can’t get the last part which will identify where the gaps happen. I think I can modify the above code to push this function across the finish line, but I need some help.I have rectangular prisms at fixed locations defined below, and I’m trying to see if they fit in a box without any gaps or overlaps. The perfect no-gaps, no-overlaps solution looks like the picture of the attached Jenga tower.
% Fit the following rectangular prisms in a box:
prisms.p1.x = [75 200]; % Min/max of x range for prism p1
prisms.p1.y = [4 100]; % Min/max of y range for prism p1
prisms.p1.z = [1e3 1e4]; % Min/max of z range for prism p1
prisms.p2.x = [20 80];
prisms.p2.y = [0.1 2.2];
prisms.p2.z = [0 1e3];
prisms.p3.x = [80 115];
prisms.p3.y = [0.1 4];
prisms.p3.z = [0 1e3];
prisms.p4.x = [20 180];
prisms.p4.y = [2.2 8];
prisms.p4.z = [0 1e3];
prisms.p5.x = [200 1000];
prisms.p5.y = [0 1];
prisms.p5.z = [0 1e4];
% The box that the prisms must fit in, given the values above, is:
box.x = [20 1000]; % Min/max of x range for the box of prisms
box.y = [0 100]; % Min/max of x range for the box of prisms
box.z = [0 1e4]; % Min/max of x range for the box of prisms
Above is a struct called prisms. It has 5 fields; each field describes one prism (p1,p2,p3,p4,p5) using x,y,z coordinates. I want to identify if the rectangular prisms have any overlaps or gaps between them, and if so, report where those gaps and/or overlaps occur. The ranges are all aligned with the axes, and are always >=0.
The size of the box that the prisms must fit in is defined to be the min and max values over all prisms for a particular axis. If two prisms touch at only one point in their range, I don’t count that as an "overlap". I don’t want to move the prisms, but instead want to report where two prisms overlap, or where there are gaps in the box.
I’ve found all the overlapping regions by testing pairs of rectangular prisms for overlap, and it seems to work:
%% Get all combinations of classes (combinations since order does not matter)
nFields = length(fieldnames(prisms));
combos = nchoosek(1:nFields,2);
nCombos = nchoosek(nFields,2);
% Index the struct by index instead of field name
fns = fieldnames(prisms);
%% Check for overlap between each pair of classes
for ic = 1:nCombos
x11 = prisms.(fns{combos(ic,1)}).x(1);
x12 = prisms.(fns{combos(ic,1)}).x(2);
y11 = prisms.(fns{combos(ic,1)}).y(1);
y12 = prisms.(fns{combos(ic,1)}).y(2);
z11 = prisms.(fns{combos(ic,1)}).z(1);
z12 = prisms.(fns{combos(ic,1)}).z(2);
x21 = prisms.(fns{combos(ic,2)}).x(1);
x22 = prisms.(fns{combos(ic,2)}).x(2);
y21 = prisms.(fns{combos(ic,2)}).y(1);
y22 = prisms.(fns{combos(ic,2)}).y(2);
z21 = prisms.(fns{combos(ic,2)}).z(1);
z22 = prisms.(fns{combos(ic,2)}).z(2);
if( (x12>x21 && y12>y21 && z12>z21) || (x21>x12 && y21>y12 && z21>z12) )
% There is either overlap, or the edge of classes align
% Check for overlap in x
if( ((x12>=x21) && (x11<=x22)) || ((x11<=x22) && (x21<=x21)) )
if((x21==x12) || (x11==x22))
continue;
else
fprintf(‘Overlap in x between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,1)}, x11, x12);
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,2)}, x21, x22);
end
end
% Check for overlap in y
if( ((y12>=y21) && (y11<=y22)) || ((y11<=y22) && (y21<=y21)) )
if((y21==y12) || (y11==y22))
continue;
else
fprintf(‘Overlap in y between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,1)}, y11, y12);
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,2)}, y21, y22);
end
end
% Check for overlap in z
if( ((z12>=z21) && (z11<=z22)) || ((z11<=z22) && (z21<=z21)) )
if((z21==z12) || (z11==z22))
continue;
else
fprintf(‘Overlap in z between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,1)}, z11, z12);
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,2)}, z21, z22);
end
end
end
end
I just can’t get the last part which will identify where the gaps happen. I think I can modify the above code to push this function across the finish line, but I need some help. I have rectangular prisms at fixed locations defined below, and I’m trying to see if they fit in a box without any gaps or overlaps. The perfect no-gaps, no-overlaps solution looks like the picture of the attached Jenga tower.
% Fit the following rectangular prisms in a box:
prisms.p1.x = [75 200]; % Min/max of x range for prism p1
prisms.p1.y = [4 100]; % Min/max of y range for prism p1
prisms.p1.z = [1e3 1e4]; % Min/max of z range for prism p1
prisms.p2.x = [20 80];
prisms.p2.y = [0.1 2.2];
prisms.p2.z = [0 1e3];
prisms.p3.x = [80 115];
prisms.p3.y = [0.1 4];
prisms.p3.z = [0 1e3];
prisms.p4.x = [20 180];
prisms.p4.y = [2.2 8];
prisms.p4.z = [0 1e3];
prisms.p5.x = [200 1000];
prisms.p5.y = [0 1];
prisms.p5.z = [0 1e4];
% The box that the prisms must fit in, given the values above, is:
box.x = [20 1000]; % Min/max of x range for the box of prisms
box.y = [0 100]; % Min/max of x range for the box of prisms
box.z = [0 1e4]; % Min/max of x range for the box of prisms
Above is a struct called prisms. It has 5 fields; each field describes one prism (p1,p2,p3,p4,p5) using x,y,z coordinates. I want to identify if the rectangular prisms have any overlaps or gaps between them, and if so, report where those gaps and/or overlaps occur. The ranges are all aligned with the axes, and are always >=0.
The size of the box that the prisms must fit in is defined to be the min and max values over all prisms for a particular axis. If two prisms touch at only one point in their range, I don’t count that as an "overlap". I don’t want to move the prisms, but instead want to report where two prisms overlap, or where there are gaps in the box.
I’ve found all the overlapping regions by testing pairs of rectangular prisms for overlap, and it seems to work:
%% Get all combinations of classes (combinations since order does not matter)
nFields = length(fieldnames(prisms));
combos = nchoosek(1:nFields,2);
nCombos = nchoosek(nFields,2);
% Index the struct by index instead of field name
fns = fieldnames(prisms);
%% Check for overlap between each pair of classes
for ic = 1:nCombos
x11 = prisms.(fns{combos(ic,1)}).x(1);
x12 = prisms.(fns{combos(ic,1)}).x(2);
y11 = prisms.(fns{combos(ic,1)}).y(1);
y12 = prisms.(fns{combos(ic,1)}).y(2);
z11 = prisms.(fns{combos(ic,1)}).z(1);
z12 = prisms.(fns{combos(ic,1)}).z(2);
x21 = prisms.(fns{combos(ic,2)}).x(1);
x22 = prisms.(fns{combos(ic,2)}).x(2);
y21 = prisms.(fns{combos(ic,2)}).y(1);
y22 = prisms.(fns{combos(ic,2)}).y(2);
z21 = prisms.(fns{combos(ic,2)}).z(1);
z22 = prisms.(fns{combos(ic,2)}).z(2);
if( (x12>x21 && y12>y21 && z12>z21) || (x21>x12 && y21>y12 && z21>z12) )
% There is either overlap, or the edge of classes align
% Check for overlap in x
if( ((x12>=x21) && (x11<=x22)) || ((x11<=x22) && (x21<=x21)) )
if((x21==x12) || (x11==x22))
continue;
else
fprintf(‘Overlap in x between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,1)}, x11, x12);
fprintf(‘ Limits for %s x: [%g %g]n’, fns{combos(ic,2)}, x21, x22);
end
end
% Check for overlap in y
if( ((y12>=y21) && (y11<=y22)) || ((y11<=y22) && (y21<=y21)) )
if((y21==y12) || (y11==y22))
continue;
else
fprintf(‘Overlap in y between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,1)}, y11, y12);
fprintf(‘ Limits for %s y: [%g %g]n’, fns{combos(ic,2)}, y21, y22);
end
end
% Check for overlap in z
if( ((z12>=z21) && (z11<=z22)) || ((z11<=z22) && (z21<=z21)) )
if((z21==z12) || (z11==z22))
continue;
else
fprintf(‘Overlap in z between %s and %sn’, fns{combos(ic,1)}, fns{combos(ic,2)});
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,1)}, z11, z12);
fprintf(‘ Limits for %s z: [%g %g]n’, fns{combos(ic,2)}, z21, z22);
end
end
end
end
I just can’t get the last part which will identify where the gaps happen. I think I can modify the above code to push this function across the finish line, but I need some help. matlab, function, 3d, mathematics MATLAB Answers — New Questions
Position finding by triangulation
How can I triangulate a position using two DMEs in matlab?How can I triangulate a position using two DMEs in matlab? How can I triangulate a position using two DMEs in matlab? navigation MATLAB Answers — New Questions
Import PyTorch LSTM Model into Matlab
Hey Guys,
I am currently trying to use my Pytorch LSTM in Matlab (Trained with Pytorch Lightning) but I have no idea how to use the importNetworkFromPyTorch function with an LSTM. The Structure of the model is the following:
LSTM -> Linear -> Sigmoid
The LSTM properties (https://docs.pytorch.org/docs/stable/generated/torch.nn.LSTM.html) are (num_inputs=3, nhid=5, nlayers=5) which causes the Linear layer to be (in=5, out=1).
The Training Data has the shape [BS, 600, 3] with BS being batch_size, 600 being the time series and 3 being the individual input at one timestep. The shape of the hidden state is [5, BS, 5].
So my problem is that I do not understand what input sizes I have to put into the importNetworkFromPyTorch function.
I expect it so be something like this:
net = importNetworkFromPyTorch("example/path/model.pt",PyTorchInputSizes={[NaN,3], [2, 5, NaN, 5]})
I exported the traced model by:
traced_model = torch.jit.trace(model.model.forward, (input, hidden_input))
torch.jit.save(traced_model, "model.pt")
The shape of input is [3] and of hidden_input is ([5, 1, 5], [5, 1, 5]) (one for hidden state and one for context)
Can you please tell me how to use this importNetworkFromPyTorch function.Hey Guys,
I am currently trying to use my Pytorch LSTM in Matlab (Trained with Pytorch Lightning) but I have no idea how to use the importNetworkFromPyTorch function with an LSTM. The Structure of the model is the following:
LSTM -> Linear -> Sigmoid
The LSTM properties (https://docs.pytorch.org/docs/stable/generated/torch.nn.LSTM.html) are (num_inputs=3, nhid=5, nlayers=5) which causes the Linear layer to be (in=5, out=1).
The Training Data has the shape [BS, 600, 3] with BS being batch_size, 600 being the time series and 3 being the individual input at one timestep. The shape of the hidden state is [5, BS, 5].
So my problem is that I do not understand what input sizes I have to put into the importNetworkFromPyTorch function.
I expect it so be something like this:
net = importNetworkFromPyTorch("example/path/model.pt",PyTorchInputSizes={[NaN,3], [2, 5, NaN, 5]})
I exported the traced model by:
traced_model = torch.jit.trace(model.model.forward, (input, hidden_input))
torch.jit.save(traced_model, "model.pt")
The shape of input is [3] and of hidden_input is ([5, 1, 5], [5, 1, 5]) (one for hidden state and one for context)
Can you please tell me how to use this importNetworkFromPyTorch function. Hey Guys,
I am currently trying to use my Pytorch LSTM in Matlab (Trained with Pytorch Lightning) but I have no idea how to use the importNetworkFromPyTorch function with an LSTM. The Structure of the model is the following:
LSTM -> Linear -> Sigmoid
The LSTM properties (https://docs.pytorch.org/docs/stable/generated/torch.nn.LSTM.html) are (num_inputs=3, nhid=5, nlayers=5) which causes the Linear layer to be (in=5, out=1).
The Training Data has the shape [BS, 600, 3] with BS being batch_size, 600 being the time series and 3 being the individual input at one timestep. The shape of the hidden state is [5, BS, 5].
So my problem is that I do not understand what input sizes I have to put into the importNetworkFromPyTorch function.
I expect it so be something like this:
net = importNetworkFromPyTorch("example/path/model.pt",PyTorchInputSizes={[NaN,3], [2, 5, NaN, 5]})
I exported the traced model by:
traced_model = torch.jit.trace(model.model.forward, (input, hidden_input))
torch.jit.save(traced_model, "model.pt")
The shape of input is [3] and of hidden_input is ([5, 1, 5], [5, 1, 5]) (one for hidden state and one for context)
Can you please tell me how to use this importNetworkFromPyTorch function. python, pytorch, lstm, load nn MATLAB Answers — New Questions
appdesigner – disruptive help popups
Matlab 9.6.0.1472908 (R2019a) Update 9
(I cannot use a newer version because of compatibility issues with others using my code)
How can I disable those super annoying help popups in App Designer when trying to type anything? I cannot see surrounding code, the popups grab the cursor keys, and they never help (me). It seems that they can be disabled easily in newer versions of App Designer, but I could not find a way in 2019a.Matlab 9.6.0.1472908 (R2019a) Update 9
(I cannot use a newer version because of compatibility issues with others using my code)
How can I disable those super annoying help popups in App Designer when trying to type anything? I cannot see surrounding code, the popups grab the cursor keys, and they never help (me). It seems that they can be disabled easily in newer versions of App Designer, but I could not find a way in 2019a. Matlab 9.6.0.1472908 (R2019a) Update 9
(I cannot use a newer version because of compatibility issues with others using my code)
How can I disable those super annoying help popups in App Designer when trying to type anything? I cannot see surrounding code, the popups grab the cursor keys, and they never help (me). It seems that they can be disabled easily in newer versions of App Designer, but I could not find a way in 2019a. popups, appdesigner MATLAB Answers — New Questions
What are the signs that my parameter estimator is on the right track before convergence?
I am doing parameter estimation using parameter estimator app
and the optimization is taking hours
but i have noticed as shown in photo attached that EXP (Minimize ) is not converging and Shows NAN , and i gues this is a bad sign
So How to evaluate parameter estimator performance mid-optimization?I am doing parameter estimation using parameter estimator app
and the optimization is taking hours
but i have noticed as shown in photo attached that EXP (Minimize ) is not converging and Shows NAN , and i gues this is a bad sign
So How to evaluate parameter estimator performance mid-optimization? I am doing parameter estimation using parameter estimator app
and the optimization is taking hours
but i have noticed as shown in photo attached that EXP (Minimize ) is not converging and Shows NAN , and i gues this is a bad sign
So How to evaluate parameter estimator performance mid-optimization? parameter estimator, convergence, optimization, nan, minimization MATLAB Answers — New Questions
How can I change the number of ports for VariantSource programmatic?
I’d like to change the number of ports for the VariantSource block. If I try to change the ‘Ports’ element with set_param command, I get the answer that this field is read-only.
Has anyone an idea how I can change the number of ports programmatic?I’d like to change the number of ports for the VariantSource block. If I try to change the ‘Ports’ element with set_param command, I get the answer that this field is read-only.
Has anyone an idea how I can change the number of ports programmatic? I’d like to change the number of ports for the VariantSource block. If I try to change the ‘Ports’ element with set_param command, I get the answer that this field is read-only.
Has anyone an idea how I can change the number of ports programmatic? matlab;, programming, programmatic, block;, ports;, change;, add;, remove MATLAB Answers — New Questions
wich Matlab-Simulink version support FMU co-simulation ver. 1.0 ?
I have already R2024b version which can export only FMU ver. 2.0 and 3.0 bu t i need FMU CS ver. 1.0I have already R2024b version which can export only FMU ver. 2.0 and 3.0 bu t i need FMU CS ver. 1.0 I have already R2024b version which can export only FMU ver. 2.0 and 3.0 bu t i need FMU CS ver. 1.0 fmu export MATLAB Answers — New Questions
I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D
I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code.I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code. I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code. matlab MATLAB Answers — New Questions
Why are there duplicate posts in MATLAB Answers?
Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly?Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly? Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly? matlab answers, meta MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 89?
Why do I receive the following error:
MathWorks Licensing Error 89
A licensing error occurred while trying to use <PRODUCTNAME>.Why do I receive the following error:
MathWorks Licensing Error 89
A licensing error occurred while trying to use <PRODUCTNAME>. Why do I receive the following error:
MathWorks Licensing Error 89
A licensing error occurred while trying to use <PRODUCTNAME>. MATLAB Answers — New Questions
Why am I receiving MathWorks Licensing Error 92?
Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines.Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines. Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines. MATLAB Answers — New Questions
MATLAB transmission line problem
Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor.Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor. Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor. medium transmission lines, matlab, simulink MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 3?
Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>.Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>. Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>. MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 12?
Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>.Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>. Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>. MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 38?
Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file.Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file. Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file. MATLAB Answers — New Questions
Warning: Error updating FunctionLine in using fplot
Hi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
endHi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
end Hi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
end matlab, plot, error, function MATLAB Answers — New Questions
Solid creation Simulink, simscape multibody: stuck in loading
Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance.Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance. Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance. simscape, multibody, simulink MATLAB Answers — New Questions