5
votes
1answer
123 views

How to speed up this following code

I am doing my research about scheduling by using Matlab. I am a new Matlab user and I have a problem with time execution of my following code: clc clear all A=8; B=12; C=10; ProcessTime= [ 11 11 11 ...
3
votes
1answer
355 views

Code's optimization and speeding up (Legendre's polynomials and functions) in Matlab

I would like to improve this function to reduce the run time and optimize it. function [Pl,Plm] = funlegendre(gamma) Plm = zeros(70,71); Pl = zeros(70,1); P0 = 1; Pl(1) = gamma; ...
2
votes
1answer
58 views

how to get B+ matrix (warshall algorithm) in matlab?

Pseudocode: // B = nxn binary matrix // Bm = resulting matrix for (i=1; i<=n; i++) { for (j=1; j<=n; j++) { if (B[i,j] == 1) { for (k=1; k<=n; k++) { Bm[i,j] ...
1
vote
0answers
19 views

Matlab: speeding up repetitive initialisation with structured data?

I need to speed up this code: it creates a multilinear function. I considered the below methods but no idea which with the largest benefit. replacing dummy variables with things such as ...