Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Problem to converge a loop in Simulink

Problem to converge a loop in Simulink

PuTI / 2025-01-17
Problem to converge a loop in Simulink
Matlab News

Hello , I want to simulate a close circuit that consist on a grinding mill next to hydrocyclon and have the following problem with the code that joins two flows tabla1 of dimension 11×5 and TablaFlujo1 of dimension 2×3 are from the input flow, while tabla2 of dimension 11×5 and TablaFlow2 of dimension 2×3 are from the recirculated flow(very important to remark because it causes a loop) from the whole process and in this code they are added together to form a single flow named TablaGranulometrica and TablaFlujo . i tried to initialize the recirculated flow with the desired size,and so the output stream ,but pops a error instead : "Block ”granulometria4/Subsystem3/MATLAB Function5” does not fully set the dimensions of output ‘TablaFlujo’."
I will give attach a screenshot :

I really dont know how to make it converge or at least give an initial condition so it start running . Below is the function script , will also attach the full file. thanks in advance.
function [TablaGranulometrica, TablaFlujo, total,convergencia] = fcn(tabla1, TablaFlujo1, tabla2, TablaFlujo2,epsilon)

if size(tabla2)~=size(tabla2)
tabla2 = tabla1; % Inicializa tabla2 como matriz de ceros del mismo tamaño que tabla1
end

if size(TablaFlujo1)~=size(TablaFlujo2)
TablaFlujo2 = (TablaFlujo1); % Inicializa TablaFlujo2 como matriz de ceros del mismo tamaño que TablaFlujo1
end
% Tabla Granulométrica

TablaGranulometrica = tabla1;
TablaGranulometrica(:,2) = tabla1(:,2) + tabla2(:,2);
total = sum(TablaGranulometrica(:, 2));
TablaGranulometrica(:, 3) = (TablaGranulometrica(:, 2) / total) * 100;
TablaGranulometrica(:, 4) = cumsum(TablaGranulometrica(:, 3));
TablaGranulometrica(:, 5) = 100 – TablaGranulometrica(:, 4);

% Tabla de Flujo
TablaFlujo = size(2, 3); % Dimensiones fijas [2×3]
TablaFlujo = zeros(size(TablaFlujo1)); % Inicializa la salida
TablaFlujo(1,1) = TablaFlujo1(1,1) + TablaFlujo2(1,1);
TablaFlujo(2,3) = TablaFlujo1(2,3) + TablaFlujo2(2,3);
TablaFlujo(2,2) = (TablaFlujo(1,1) / 2.45) + TablaFlujo(2,3);
TablaFlujo(2,1) = 100 * TablaFlujo(1,1) / (TablaFlujo(1,1) + TablaFlujo(2,3));
TablaFlujo(1,2) = 100 * (TablaFlujo(1,1)) / (TablaFlujo(2,1) * TablaFlujo(2,2));
TablaFlujo(1,3) = 2.45;

% Cálculo final de total
total = sum(TablaGranulometrica(:,2)) * 24;

error_tabla = max(abs(tabla1(:,2) – tabla2(:,2)));
error_flujo = max(abs(TablaFlujo1(:,1) – TablaFlujo2(:,1)));
convergencia = (error_tabla < epsilon) && (error_flujo < epsilon);
endHello , I want to simulate a close circuit that consist on a grinding mill next to hydrocyclon and have the following problem with the code that joins two flows tabla1 of dimension 11×5 and TablaFlujo1 of dimension 2×3 are from the input flow, while tabla2 of dimension 11×5 and TablaFlow2 of dimension 2×3 are from the recirculated flow(very important to remark because it causes a loop) from the whole process and in this code they are added together to form a single flow named TablaGranulometrica and TablaFlujo . i tried to initialize the recirculated flow with the desired size,and so the output stream ,but pops a error instead : "Block ”granulometria4/Subsystem3/MATLAB Function5” does not fully set the dimensions of output ‘TablaFlujo’."
I will give attach a screenshot :

I really dont know how to make it converge or at least give an initial condition so it start running . Below is the function script , will also attach the full file. thanks in advance.
function [TablaGranulometrica, TablaFlujo, total,convergencia] = fcn(tabla1, TablaFlujo1, tabla2, TablaFlujo2,epsilon)

if size(tabla2)~=size(tabla2)
tabla2 = tabla1; % Inicializa tabla2 como matriz de ceros del mismo tamaño que tabla1
end

if size(TablaFlujo1)~=size(TablaFlujo2)
TablaFlujo2 = (TablaFlujo1); % Inicializa TablaFlujo2 como matriz de ceros del mismo tamaño que TablaFlujo1
end
% Tabla Granulométrica

TablaGranulometrica = tabla1;
TablaGranulometrica(:,2) = tabla1(:,2) + tabla2(:,2);
total = sum(TablaGranulometrica(:, 2));
TablaGranulometrica(:, 3) = (TablaGranulometrica(:, 2) / total) * 100;
TablaGranulometrica(:, 4) = cumsum(TablaGranulometrica(:, 3));
TablaGranulometrica(:, 5) = 100 – TablaGranulometrica(:, 4);

% Tabla de Flujo
TablaFlujo = size(2, 3); % Dimensiones fijas [2×3]
TablaFlujo = zeros(size(TablaFlujo1)); % Inicializa la salida
TablaFlujo(1,1) = TablaFlujo1(1,1) + TablaFlujo2(1,1);
TablaFlujo(2,3) = TablaFlujo1(2,3) + TablaFlujo2(2,3);
TablaFlujo(2,2) = (TablaFlujo(1,1) / 2.45) + TablaFlujo(2,3);
TablaFlujo(2,1) = 100 * TablaFlujo(1,1) / (TablaFlujo(1,1) + TablaFlujo(2,3));
TablaFlujo(1,2) = 100 * (TablaFlujo(1,1)) / (TablaFlujo(2,1) * TablaFlujo(2,2));
TablaFlujo(1,3) = 2.45;

% Cálculo final de total
total = sum(TablaGranulometrica(:,2)) * 24;

error_tabla = max(abs(tabla1(:,2) – tabla2(:,2)));
error_flujo = max(abs(TablaFlujo1(:,1) – TablaFlujo2(:,1)));
convergencia = (error_tabla < epsilon) && (error_flujo < epsilon);
end Hello , I want to simulate a close circuit that consist on a grinding mill next to hydrocyclon and have the following problem with the code that joins two flows tabla1 of dimension 11×5 and TablaFlujo1 of dimension 2×3 are from the input flow, while tabla2 of dimension 11×5 and TablaFlow2 of dimension 2×3 are from the recirculated flow(very important to remark because it causes a loop) from the whole process and in this code they are added together to form a single flow named TablaGranulometrica and TablaFlujo . i tried to initialize the recirculated flow with the desired size,and so the output stream ,but pops a error instead : "Block ”granulometria4/Subsystem3/MATLAB Function5” does not fully set the dimensions of output ‘TablaFlujo’."
I will give attach a screenshot :

I really dont know how to make it converge or at least give an initial condition so it start running . Below is the function script , will also attach the full file. thanks in advance.
function [TablaGranulometrica, TablaFlujo, total,convergencia] = fcn(tabla1, TablaFlujo1, tabla2, TablaFlujo2,epsilon)

if size(tabla2)~=size(tabla2)
tabla2 = tabla1; % Inicializa tabla2 como matriz de ceros del mismo tamaño que tabla1
end

if size(TablaFlujo1)~=size(TablaFlujo2)
TablaFlujo2 = (TablaFlujo1); % Inicializa TablaFlujo2 como matriz de ceros del mismo tamaño que TablaFlujo1
end
% Tabla Granulométrica

TablaGranulometrica = tabla1;
TablaGranulometrica(:,2) = tabla1(:,2) + tabla2(:,2);
total = sum(TablaGranulometrica(:, 2));
TablaGranulometrica(:, 3) = (TablaGranulometrica(:, 2) / total) * 100;
TablaGranulometrica(:, 4) = cumsum(TablaGranulometrica(:, 3));
TablaGranulometrica(:, 5) = 100 – TablaGranulometrica(:, 4);

% Tabla de Flujo
TablaFlujo = size(2, 3); % Dimensiones fijas [2×3]
TablaFlujo = zeros(size(TablaFlujo1)); % Inicializa la salida
TablaFlujo(1,1) = TablaFlujo1(1,1) + TablaFlujo2(1,1);
TablaFlujo(2,3) = TablaFlujo1(2,3) + TablaFlujo2(2,3);
TablaFlujo(2,2) = (TablaFlujo(1,1) / 2.45) + TablaFlujo(2,3);
TablaFlujo(2,1) = 100 * TablaFlujo(1,1) / (TablaFlujo(1,1) + TablaFlujo(2,3));
TablaFlujo(1,2) = 100 * (TablaFlujo(1,1)) / (TablaFlujo(2,1) * TablaFlujo(2,2));
TablaFlujo(1,3) = 2.45;

% Cálculo final de total
total = sum(TablaGranulometrica(:,2)) * 24;

error_tabla = max(abs(tabla1(:,2) – tabla2(:,2)));
error_flujo = max(abs(TablaFlujo1(:,1) – TablaFlujo2(:,1)));
convergencia = (error_tabla < epsilon) && (error_flujo < epsilon);
end simulink, loop, converge MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

How to debug C# .NET assembly called from MATLAB?
2025-05-15

How to debug C# .NET assembly called from MATLAB?

How do I set the size of a tile from tiledlayout?
2025-05-15

How do I set the size of a tile from tiledlayout?

Communicate with worker through client
2025-05-15

Communicate with worker through client

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss