Category: Matlab
Category Archives: Matlab
How do I construct a mesh in PDE Solver from only the boundary points?
Basically, the title. I have a non-uniform or clustered mesh on which I would like to solve a particular PDE but I can’t figure out how. I know the boundary points and nothing else. Any help?Basically, the title. I have a non-uniform or clustered mesh on which I would like to solve a particular PDE but I can’t figure out how. I know the boundary points and nothing else. Any help? Basically, the title. I have a non-uniform or clustered mesh on which I would like to solve a particular PDE but I can’t figure out how. I know the boundary points and nothing else. Any help? mesh MATLAB Answers — New Questions
How to install Matlab without Oracle java and use Open JDK instead?
How to install Matlab without Oracle java and use Open JDK instead. We think that we need update all our installation to use Open java because Oracle is starting to end free use of java. We use SCCM to install software silent.How to install Matlab without Oracle java and use Open JDK instead. We think that we need update all our installation to use Open java because Oracle is starting to end free use of java. We use SCCM to install software silent. How to install Matlab without Oracle java and use Open JDK instead. We think that we need update all our installation to use Open java because Oracle is starting to end free use of java. We use SCCM to install software silent. open jdk, install matlab MATLAB Answers — New Questions
How set up a parameter in the PDE Modeler App as a function?
Good morning,
i’m studying the freezing process of mozzarella cheese: for T>0°C there is a heat exchange by convection for water content, but for T <0 °C the heat exchange is by conduction due to the presence of ice.
How set up these coefficient as a function? For example refering the value from Matlab’s script? With a "IF Cycle? With a Overlay of convection and conduction effect?
I’ven’t idea :(Good morning,
i’m studying the freezing process of mozzarella cheese: for T>0°C there is a heat exchange by convection for water content, but for T <0 °C the heat exchange is by conduction due to the presence of ice.
How set up these coefficient as a function? For example refering the value from Matlab’s script? With a "IF Cycle? With a Overlay of convection and conduction effect?
I’ven’t idea 🙁 Good morning,
i’m studying the freezing process of mozzarella cheese: for T>0°C there is a heat exchange by convection for water content, but for T <0 °C the heat exchange is by conduction due to the presence of ice.
How set up these coefficient as a function? For example refering the value from Matlab’s script? With a "IF Cycle? With a Overlay of convection and conduction effect?
I’ven’t idea 🙁 pde modeler MATLAB Answers — New Questions
web cam üzerinden nesne boyutu tespit etme
vidaların m8 mi m10 mu tespit etmek ıstiyorum hangı komutları kullanmalıyımvidaların m8 mi m10 mu tespit etmek ıstiyorum hangı komutları kullanmalıyım vidaların m8 mi m10 mu tespit etmek ıstiyorum hangı komutları kullanmalıyım nesne boyutu MATLAB Answers — New Questions
Detect peaks before drop in signal
Hi everyone,
I have this signal where i need to detect only the peak right before the signal drops but I can’t figure out a way to do it. Can anyone give me a hand?
Thank you so much!Hi everyone,
I have this signal where i need to detect only the peak right before the signal drops but I can’t figure out a way to do it. Can anyone give me a hand?
Thank you so much! Hi everyone,
I have this signal where i need to detect only the peak right before the signal drops but I can’t figure out a way to do it. Can anyone give me a hand?
Thank you so much! findpeaks MATLAB Answers — New Questions
don’t understand output of fitlme, intercept substituted for first line.
Hi – I fit some linear mixed effect models using , but the output always substitutes ‘intercept’ for the first line of the fixed effect coefficiants. Why is this?
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue Lower
{‘(Intercept)’ } -1.984e-05 6.4305e-06 -3.0853 37 0.0038374 -3.2869e-05
{‘voc_registers_ADS’ } -9.3714e-06 6.9456e-06 -1.3493 37 0.18545 -2.3444e-05
{‘voc_registers_nonSpeech’} 5.4826e-06 6.4513e-06 0.84985 37 0.40088Hi – I fit some linear mixed effect models using , but the output always substitutes ‘intercept’ for the first line of the fixed effect coefficiants. Why is this?
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue Lower
{‘(Intercept)’ } -1.984e-05 6.4305e-06 -3.0853 37 0.0038374 -3.2869e-05
{‘voc_registers_ADS’ } -9.3714e-06 6.9456e-06 -1.3493 37 0.18545 -2.3444e-05
{‘voc_registers_nonSpeech’} 5.4826e-06 6.4513e-06 0.84985 37 0.40088 Hi – I fit some linear mixed effect models using , but the output always substitutes ‘intercept’ for the first line of the fixed effect coefficiants. Why is this?
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue Lower
{‘(Intercept)’ } -1.984e-05 6.4305e-06 -3.0853 37 0.0038374 -3.2869e-05
{‘voc_registers_ADS’ } -9.3714e-06 6.9456e-06 -1.3493 37 0.18545 -2.3444e-05
{‘voc_registers_nonSpeech’} 5.4826e-06 6.4513e-06 0.84985 37 0.40088 lme, linear mixed effect, model MATLAB Answers — New Questions
Data and time dimensions are incompatible when running HIL
I have the same question as Data and time dimensions are incompatible error message – MATLAB Answers – MATLAB Central (mathworks.cn). The difference is that when running HIL, the scope cannot display data, while the data inspector will report the error in a few minutes.This bug seriously affects its usage.Hope it can be resolved.I have the same question as Data and time dimensions are incompatible error message – MATLAB Answers – MATLAB Central (mathworks.cn). The difference is that when running HIL, the scope cannot display data, while the data inspector will report the error in a few minutes.This bug seriously affects its usage.Hope it can be resolved. I have the same question as Data and time dimensions are incompatible error message – MATLAB Answers – MATLAB Central (mathworks.cn). The difference is that when running HIL, the scope cannot display data, while the data inspector will report the error in a few minutes.This bug seriously affects its usage.Hope it can be resolved. speedgoat, simulink, datainspector MATLAB Answers — New Questions
Code runs well on Windows but gets errors on Apple Silicon Mac
paths;
algorithms = {‘RSA’};
dimension = 20; % (2, 10, 20)
maxFE = 1000; % 1000000
cec2022 = str2func(‘cec22_test_func’);
globalMins = {300, 400, 600, 800, 900, 1800, 2000, 2200, 2300, 2400, 2600, 2700};
experimentNumber = 1; run = 21;
filename = ‘result-‘;
functionsNumber = 12;
global count;
solution = zeros(experimentNumber, functionsNumber, run);
solutionR = zeros(functionsNumber * experimentNumber, run);
for ii = 1 : length(algorithms)
disp(algorithms(ii));
algorithm = str2func(char(algorithms(ii)));
for i = 1 : functionsNumber
disp(i);
for j = 1 : run
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
disp(count);
count = 0;
solution(1, i, j) = bestFitness – globalMins{i};
for k = 1 : experimentNumber
solutionR(k + experimentNumber * (i – 1), j) = solution(k, i, j);
end
end
end
xlswrite(strcat(filename, func2str(algorithm), ‘-d=’, num2str(dimension), ‘.xlsx’), solutionR, 1);
eD = strcat(func2str(algorithm), ‘-Bitti :)’);
disp(eD);
end
I’ve tried this code with my friends Winodws Laptop. We both have just dowloaded Matlab so there is no configuration file for both sides. Error is:
Unrecognized function or variable ‘cec22_test_func’.
Error in testFunction (line 29)
fitness = feval(fhd, x, fNumber);
Error in RSA (line 25)
Ffun(1,i)=testFunction(X(i,:)’, fhd, fNumber);
Error in main (line 21)
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
My friend runs this codes with no issue. I literally have no idea what’s happening…paths;
algorithms = {‘RSA’};
dimension = 20; % (2, 10, 20)
maxFE = 1000; % 1000000
cec2022 = str2func(‘cec22_test_func’);
globalMins = {300, 400, 600, 800, 900, 1800, 2000, 2200, 2300, 2400, 2600, 2700};
experimentNumber = 1; run = 21;
filename = ‘result-‘;
functionsNumber = 12;
global count;
solution = zeros(experimentNumber, functionsNumber, run);
solutionR = zeros(functionsNumber * experimentNumber, run);
for ii = 1 : length(algorithms)
disp(algorithms(ii));
algorithm = str2func(char(algorithms(ii)));
for i = 1 : functionsNumber
disp(i);
for j = 1 : run
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
disp(count);
count = 0;
solution(1, i, j) = bestFitness – globalMins{i};
for k = 1 : experimentNumber
solutionR(k + experimentNumber * (i – 1), j) = solution(k, i, j);
end
end
end
xlswrite(strcat(filename, func2str(algorithm), ‘-d=’, num2str(dimension), ‘.xlsx’), solutionR, 1);
eD = strcat(func2str(algorithm), ‘-Bitti :)’);
disp(eD);
end
I’ve tried this code with my friends Winodws Laptop. We both have just dowloaded Matlab so there is no configuration file for both sides. Error is:
Unrecognized function or variable ‘cec22_test_func’.
Error in testFunction (line 29)
fitness = feval(fhd, x, fNumber);
Error in RSA (line 25)
Ffun(1,i)=testFunction(X(i,:)’, fhd, fNumber);
Error in main (line 21)
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
My friend runs this codes with no issue. I literally have no idea what’s happening… paths;
algorithms = {‘RSA’};
dimension = 20; % (2, 10, 20)
maxFE = 1000; % 1000000
cec2022 = str2func(‘cec22_test_func’);
globalMins = {300, 400, 600, 800, 900, 1800, 2000, 2200, 2300, 2400, 2600, 2700};
experimentNumber = 1; run = 21;
filename = ‘result-‘;
functionsNumber = 12;
global count;
solution = zeros(experimentNumber, functionsNumber, run);
solutionR = zeros(functionsNumber * experimentNumber, run);
for ii = 1 : length(algorithms)
disp(algorithms(ii));
algorithm = str2func(char(algorithms(ii)));
for i = 1 : functionsNumber
disp(i);
for j = 1 : run
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
disp(count);
count = 0;
solution(1, i, j) = bestFitness – globalMins{i};
for k = 1 : experimentNumber
solutionR(k + experimentNumber * (i – 1), j) = solution(k, i, j);
end
end
end
xlswrite(strcat(filename, func2str(algorithm), ‘-d=’, num2str(dimension), ‘.xlsx’), solutionR, 1);
eD = strcat(func2str(algorithm), ‘-Bitti :)’);
disp(eD);
end
I’ve tried this code with my friends Winodws Laptop. We both have just dowloaded Matlab so there is no configuration file for both sides. Error is:
Unrecognized function or variable ‘cec22_test_func’.
Error in testFunction (line 29)
fitness = feval(fhd, x, fNumber);
Error in RSA (line 25)
Ffun(1,i)=testFunction(X(i,:)’, fhd, fNumber);
Error in main (line 21)
[~, bestFitness, ~] = algorithm(cec2022, dimension, maxFE, i);
My friend runs this codes with no issue. I literally have no idea what’s happening… mac, error, apple, silicon, windows MATLAB Answers — New Questions
Fuzzy control problem:(1)input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24;
In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24.
取消组合 1025 相似
显示堆栈跟踪
组件:Simulink | 类别:Model 警告
In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, no rules fired for Output 1. Defuzzified output value set to its mean range value 0.
取消组合 3075 相似In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24.
取消组合 1025 相似
显示堆栈跟踪
组件:Simulink | 类别:Model 警告
In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, no rules fired for Output 1. Defuzzified output value set to its mean range value 0.
取消组合 3075 相似 In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24.
取消组合 1025 相似
显示堆栈跟踪
组件:Simulink | 类别:Model 警告
In ‘EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller’, no rules fired for Output 1. Defuzzified output value set to its mean range value 0.
取消组合 3075 相似 fuzzy control, pid MATLAB Answers — New Questions
I am unable to find the minimum value of function f in this optimization problem. The solver always returns 0 for all variables which is not possible. I am unable to correct.
A=[ -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
lb=zeros(45,1);
ub=[];
b = [12080409 1298550 1347885 12093180 16779807 9015369 30515991 12545445 11203005 9049854 30442401 16253193 21471318 29855661 8079324 267300000 213840000 588060000];
f = [0.0969 0.1236 0.0485 0.0267 0.0776 0.1164 0.6012 0.24 0.3297 0.1419 0.4388 0.5319 0.8969 0.1503 0.2448 0.2691 0.2909 0.223 0.1769 0.2206 0.0703 0.7661 0.3952 0.5067 0.5745 0.5915 0.6642 1.0206 0.3055 0.4097 0.3079 0.2182 0.2352 0.2618 0.2982 0.3952 0.4024 0.3467 0.0399 0.2618 0.19880 0.1212 1.24 0.1673 0.3103];
x = linprog(f,A,b, [], [], lb, ub)A=[ -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
lb=zeros(45,1);
ub=[];
b = [12080409 1298550 1347885 12093180 16779807 9015369 30515991 12545445 11203005 9049854 30442401 16253193 21471318 29855661 8079324 267300000 213840000 588060000];
f = [0.0969 0.1236 0.0485 0.0267 0.0776 0.1164 0.6012 0.24 0.3297 0.1419 0.4388 0.5319 0.8969 0.1503 0.2448 0.2691 0.2909 0.223 0.1769 0.2206 0.0703 0.7661 0.3952 0.5067 0.5745 0.5915 0.6642 1.0206 0.3055 0.4097 0.3079 0.2182 0.2352 0.2618 0.2982 0.3952 0.4024 0.3467 0.0399 0.2618 0.19880 0.1212 1.24 0.1673 0.3103];
x = linprog(f,A,b, [], [], lb, ub) A=[ -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
lb=zeros(45,1);
ub=[];
b = [12080409 1298550 1347885 12093180 16779807 9015369 30515991 12545445 11203005 9049854 30442401 16253193 21471318 29855661 8079324 267300000 213840000 588060000];
f = [0.0969 0.1236 0.0485 0.0267 0.0776 0.1164 0.6012 0.24 0.3297 0.1419 0.4388 0.5319 0.8969 0.1503 0.2448 0.2691 0.2909 0.223 0.1769 0.2206 0.0703 0.7661 0.3952 0.5067 0.5745 0.5915 0.6642 1.0206 0.3055 0.4097 0.3079 0.2182 0.2352 0.2618 0.2982 0.3952 0.4024 0.3467 0.0399 0.2618 0.19880 0.1212 1.24 0.1673 0.3103];
x = linprog(f,A,b, [], [], lb, ub) optimization, matlab MATLAB Answers — New Questions
Run in parallel a script and a real-time simulation
Hi everyone!
I will try to explain myself as clear as possible so that you can understand the problem I am facing right now, which maybe has been already solved, in which case I apologize.
I am running a Real-time Simulink Model (very simple one, a sine wave with a gain whose parameter is a variable, ‘x1’)
I want to change the ‘x1’ parameter from the gain block ‘G1’ during the simulation but the main problem I am encountering is that the simulation stops until the scripts ends and it is not simultaneous.
So my question is the following: Is it possible to run a script and a simulink model at the same time so that the variables from the script are fed into the simulink model as block parameters?
Thank you so much!
Kind regards,
EduardoHi everyone!
I will try to explain myself as clear as possible so that you can understand the problem I am facing right now, which maybe has been already solved, in which case I apologize.
I am running a Real-time Simulink Model (very simple one, a sine wave with a gain whose parameter is a variable, ‘x1’)
I want to change the ‘x1’ parameter from the gain block ‘G1’ during the simulation but the main problem I am encountering is that the simulation stops until the scripts ends and it is not simultaneous.
So my question is the following: Is it possible to run a script and a simulink model at the same time so that the variables from the script are fed into the simulink model as block parameters?
Thank you so much!
Kind regards,
Eduardo Hi everyone!
I will try to explain myself as clear as possible so that you can understand the problem I am facing right now, which maybe has been already solved, in which case I apologize.
I am running a Real-time Simulink Model (very simple one, a sine wave with a gain whose parameter is a variable, ‘x1’)
I want to change the ‘x1’ parameter from the gain block ‘G1’ during the simulation but the main problem I am encountering is that the simulation stops until the scripts ends and it is not simultaneous.
So my question is the following: Is it possible to run a script and a simulink model at the same time so that the variables from the script are fed into the simulink model as block parameters?
Thank you so much!
Kind regards,
Eduardo real-time sync, parallel operation, script and simulink MATLAB Answers — New Questions
HELLO PLEASE HELP ME
I am from Armenia Master degree 1st course. I am very poor in Matlab. Please help me with my course work. my exercise is`
solve equation and then compare with simulink
equation is` y””+y”’-y”-y’=2x+2sinx
y= c1+c2e^-x+c3x^e-x+c4^ex+2x-x^2-0.5(sin x +cos x)I am from Armenia Master degree 1st course. I am very poor in Matlab. Please help me with my course work. my exercise is`
solve equation and then compare with simulink
equation is` y””+y”’-y”-y’=2x+2sinx
y= c1+c2e^-x+c3x^e-x+c4^ex+2x-x^2-0.5(sin x +cos x) I am from Armenia Master degree 1st course. I am very poor in Matlab. Please help me with my course work. my exercise is`
solve equation and then compare with simulink
equation is` y””+y”’-y”-y’=2x+2sinx
y= c1+c2e^-x+c3x^e-x+c4^ex+2x-x^2-0.5(sin x +cos x) matlab, simulink, differential equations MATLAB Answers — New Questions
Is it possible to make MatlabEngine class object persistent in Java?
Dear Matlab specialists!
My colleague wrote a simple Java class (code below) to create and use MatlabEngine "eng" object in the run() function. It works normally.
However, when one makes this object a member of class and then tries to reuse it, it looks like the whole associated Matlab session disappears after the first usage.
I am intersted in creating MatlabEngine object/session "eng" in a way when it is possible to call it from other Java classes for which the Java class where it is created, is visible. In particular, I’d like to create a Matlab class object within "eng", make some setups (which need quite long calculations), and then call the "Do(current_data)" function of this created Matlab class on my current data, i.e. whenever/wherever needed in Java. For that obviously, this "eng" object and its session should be persistent. So my question is – is it posibble at all?
Best wishes,
Y.
import com.mathworks.engine.EngineException;
import com.mathworks.engine.MatlabEngine;
import com.mathworks.engine.MatlabSyntaxException;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class javaFevalFcnMulti implements Runnable{
String[] args;
int num1;
int num2;
public javaFevalFcnMulti(String[] args_in, int num1_in, int num2_in){
args = args_in;
num1 = num1_in;
num2 = num2_in;
}
@Override
public void run() {
MatlabEngine eng;
try {
System.out.println("MLT started");
eng = MatlabEngine.startMatlab();
Object[] results = eng.feval(3, "gcd", num1, num2);
Integer G = (Integer)results[0];
Integer U = (Integer)results[1];
Integer V = (Integer)results[2];
eng.close();
System.out.println("Greatest common divisor of "+Integer.toString(num1)+" and "+Integer.toString(num2)+" is "+G.toString());
} catch (EngineException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalStateException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (MatlabSyntaxException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (ExecutionException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
}
}
}Dear Matlab specialists!
My colleague wrote a simple Java class (code below) to create and use MatlabEngine "eng" object in the run() function. It works normally.
However, when one makes this object a member of class and then tries to reuse it, it looks like the whole associated Matlab session disappears after the first usage.
I am intersted in creating MatlabEngine object/session "eng" in a way when it is possible to call it from other Java classes for which the Java class where it is created, is visible. In particular, I’d like to create a Matlab class object within "eng", make some setups (which need quite long calculations), and then call the "Do(current_data)" function of this created Matlab class on my current data, i.e. whenever/wherever needed in Java. For that obviously, this "eng" object and its session should be persistent. So my question is – is it posibble at all?
Best wishes,
Y.
import com.mathworks.engine.EngineException;
import com.mathworks.engine.MatlabEngine;
import com.mathworks.engine.MatlabSyntaxException;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class javaFevalFcnMulti implements Runnable{
String[] args;
int num1;
int num2;
public javaFevalFcnMulti(String[] args_in, int num1_in, int num2_in){
args = args_in;
num1 = num1_in;
num2 = num2_in;
}
@Override
public void run() {
MatlabEngine eng;
try {
System.out.println("MLT started");
eng = MatlabEngine.startMatlab();
Object[] results = eng.feval(3, "gcd", num1, num2);
Integer G = (Integer)results[0];
Integer U = (Integer)results[1];
Integer V = (Integer)results[2];
eng.close();
System.out.println("Greatest common divisor of "+Integer.toString(num1)+" and "+Integer.toString(num2)+" is "+G.toString());
} catch (EngineException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalStateException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (MatlabSyntaxException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (ExecutionException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
}
}
} Dear Matlab specialists!
My colleague wrote a simple Java class (code below) to create and use MatlabEngine "eng" object in the run() function. It works normally.
However, when one makes this object a member of class and then tries to reuse it, it looks like the whole associated Matlab session disappears after the first usage.
I am intersted in creating MatlabEngine object/session "eng" in a way when it is possible to call it from other Java classes for which the Java class where it is created, is visible. In particular, I’d like to create a Matlab class object within "eng", make some setups (which need quite long calculations), and then call the "Do(current_data)" function of this created Matlab class on my current data, i.e. whenever/wherever needed in Java. For that obviously, this "eng" object and its session should be persistent. So my question is – is it posibble at all?
Best wishes,
Y.
import com.mathworks.engine.EngineException;
import com.mathworks.engine.MatlabEngine;
import com.mathworks.engine.MatlabSyntaxException;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class javaFevalFcnMulti implements Runnable{
String[] args;
int num1;
int num2;
public javaFevalFcnMulti(String[] args_in, int num1_in, int num2_in){
args = args_in;
num1 = num1_in;
num2 = num2_in;
}
@Override
public void run() {
MatlabEngine eng;
try {
System.out.println("MLT started");
eng = MatlabEngine.startMatlab();
Object[] results = eng.feval(3, "gcd", num1, num2);
Integer G = (Integer)results[0];
Integer U = (Integer)results[1];
Integer V = (Integer)results[2];
eng.close();
System.out.println("Greatest common divisor of "+Integer.toString(num1)+" and "+Integer.toString(num2)+" is "+G.toString());
} catch (EngineException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalStateException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (MatlabSyntaxException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
} catch (ExecutionException ex) {
Logger.getLogger(javaFevalFcnMulti.class.getName()).log(Level.SEVERE, null, ex);
}
}
} matlabengine, java MATLAB Answers — New Questions
Ho can i stop the axtoolbar from hiding?
I want the axtoolbar within a 2D-Plot to be shown always, not only when i put the mouse in the upper right part of the plot. Can this dynamic hiding function be disabled? If there is a solution, would it also work in App Designer?
Regards,
MatthiasI want the axtoolbar within a 2D-Plot to be shown always, not only when i put the mouse in the upper right part of the plot. Can this dynamic hiding function be disabled? If there is a solution, would it also work in App Designer?
Regards,
Matthias I want the axtoolbar within a 2D-Plot to be shown always, not only when i put the mouse in the upper right part of the plot. Can this dynamic hiding function be disabled? If there is a solution, would it also work in App Designer?
Regards,
Matthias axtoolbar, visibility, dynamic, static MATLAB Answers — New Questions
Force scientific notation in axes
Sometimes, when the "raw" values in the yticks are very small, matlab y axis automatically toggles to scientific notation, whereby the power of ten giving the order of magnitude appears in the top left corner, and the yticks are given in units of that power.
The threshold for this behavior seems to be 1e-3, but I can’t seem to find a property for forcing it on larger yticks.
I have found a few questions roughly on the same topic, but none of the relevant answers seem to apply to my case. Some people simply wanted to get rid of the scientific notation, other wanted it directly in the tick labels.
I like the "order of magnitude" format, but I am unable to force it (for instance, I’d like to have it for yticks of the order of 1e-2, for graphical homogeneity with a different plot).
Before downloading or creating an "ad hoc" code, I wanted to ask whether any of you knows a (perhaps undocumented?) way of toggling the "order of magnitude" notation.
Thanks a lot
FrancescoSometimes, when the "raw" values in the yticks are very small, matlab y axis automatically toggles to scientific notation, whereby the power of ten giving the order of magnitude appears in the top left corner, and the yticks are given in units of that power.
The threshold for this behavior seems to be 1e-3, but I can’t seem to find a property for forcing it on larger yticks.
I have found a few questions roughly on the same topic, but none of the relevant answers seem to apply to my case. Some people simply wanted to get rid of the scientific notation, other wanted it directly in the tick labels.
I like the "order of magnitude" format, but I am unable to force it (for instance, I’d like to have it for yticks of the order of 1e-2, for graphical homogeneity with a different plot).
Before downloading or creating an "ad hoc" code, I wanted to ask whether any of you knows a (perhaps undocumented?) way of toggling the "order of magnitude" notation.
Thanks a lot
Francesco Sometimes, when the "raw" values in the yticks are very small, matlab y axis automatically toggles to scientific notation, whereby the power of ten giving the order of magnitude appears in the top left corner, and the yticks are given in units of that power.
The threshold for this behavior seems to be 1e-3, but I can’t seem to find a property for forcing it on larger yticks.
I have found a few questions roughly on the same topic, but none of the relevant answers seem to apply to my case. Some people simply wanted to get rid of the scientific notation, other wanted it directly in the tick labels.
I like the "order of magnitude" format, but I am unable to force it (for instance, I’d like to have it for yticks of the order of 1e-2, for graphical homogeneity with a different plot).
Before downloading or creating an "ad hoc" code, I wanted to ask whether any of you knows a (perhaps undocumented?) way of toggling the "order of magnitude" notation.
Thanks a lot
Francesco axes, ticks, scientific notation MATLAB Answers — New Questions
The write channel is same as read channel data. Why the data is not processed?
We collect the real time data from read channel and want process it before sending it to write channel, but the data values in the write channel replicate the read channel values for the following code. Could anyone give suggession how to get the processed data?
% Source ThingSpeak Channel ID for reading data
readChannelID = 2522808; % Replace with your source channel ID
% Destination ThingSpeak Channel ID for writing data
writeChannelID = 2522810; % Replace with your destination channel ID
% ThingSpeak Read API Key for the source channel
readAPIKey = ‘XXX’; % Replace with your read API key
% ThingSpeak Write API Key for the destination channel
writeAPIKey = ‘XXX’; % Replace with your write API key
%% Read Data %%
% Read all available data from the source channel
data = thingSpeakRead(readChannelID, ‘ReadKey’, readAPIKey, ‘Fields’, [1, 2]);
% Extract the values from the read data
values1 = data(:, 1); % Values from field 1 i.e. Estimated Voltage
values2 = data(:, 2); % Values from field 2 i.e. Input Current
% Determine the number of data points retrieved
numPoints = size(data, 1); % Assign the number of rows in the variable ‘data’ to the variable ‘numPoints’
% Generate timestamps for the data
timeStamps = datetime(‘now’) – minutes(numPoints:-1:1);
% Initialize Y arrays
Y1 = zeros(size(values1)); % Create a new array ‘Y1’ filled with zeros that has same size as the array ‘values1’
Y2 = zeros(size(values2)); % Create a new array ‘Y2’ filled with zeros that has same size as the array ‘values2’
% Perform the operation Y(i) = i * I(i) for each value in the read data
for i = 1:length(values1)
disp([‘Processing index ‘, num2str(i)]);
disp([‘values1(‘, num2str(i), ‘) = ‘, num2str(values1(i))]);
disp([‘values2(‘, num2str(i), ‘) = ‘, num2str(values2(i))]);
Y1(i) = i * values1(i);
Y2(i) = i * values2(i);
disp([‘Y1(‘, num2str(i), ‘) = ‘, num2str(Y1(i))]);
disp([‘Y2(‘, num2str(i), ‘) = ‘, num2str(Y2(i))]);
end
% Write the data to the destination channel with timestamps
thingSpeakWrite(writeChannelID, ‘WriteKey’, writeAPIKey, ‘Values’, [Y1′, Y2′], ‘Fields’, [1, 2], ‘Timestamps’, timeStamps);We collect the real time data from read channel and want process it before sending it to write channel, but the data values in the write channel replicate the read channel values for the following code. Could anyone give suggession how to get the processed data?
% Source ThingSpeak Channel ID for reading data
readChannelID = 2522808; % Replace with your source channel ID
% Destination ThingSpeak Channel ID for writing data
writeChannelID = 2522810; % Replace with your destination channel ID
% ThingSpeak Read API Key for the source channel
readAPIKey = ‘XXX’; % Replace with your read API key
% ThingSpeak Write API Key for the destination channel
writeAPIKey = ‘XXX’; % Replace with your write API key
%% Read Data %%
% Read all available data from the source channel
data = thingSpeakRead(readChannelID, ‘ReadKey’, readAPIKey, ‘Fields’, [1, 2]);
% Extract the values from the read data
values1 = data(:, 1); % Values from field 1 i.e. Estimated Voltage
values2 = data(:, 2); % Values from field 2 i.e. Input Current
% Determine the number of data points retrieved
numPoints = size(data, 1); % Assign the number of rows in the variable ‘data’ to the variable ‘numPoints’
% Generate timestamps for the data
timeStamps = datetime(‘now’) – minutes(numPoints:-1:1);
% Initialize Y arrays
Y1 = zeros(size(values1)); % Create a new array ‘Y1’ filled with zeros that has same size as the array ‘values1’
Y2 = zeros(size(values2)); % Create a new array ‘Y2’ filled with zeros that has same size as the array ‘values2’
% Perform the operation Y(i) = i * I(i) for each value in the read data
for i = 1:length(values1)
disp([‘Processing index ‘, num2str(i)]);
disp([‘values1(‘, num2str(i), ‘) = ‘, num2str(values1(i))]);
disp([‘values2(‘, num2str(i), ‘) = ‘, num2str(values2(i))]);
Y1(i) = i * values1(i);
Y2(i) = i * values2(i);
disp([‘Y1(‘, num2str(i), ‘) = ‘, num2str(Y1(i))]);
disp([‘Y2(‘, num2str(i), ‘) = ‘, num2str(Y2(i))]);
end
% Write the data to the destination channel with timestamps
thingSpeakWrite(writeChannelID, ‘WriteKey’, writeAPIKey, ‘Values’, [Y1′, Y2′], ‘Fields’, [1, 2], ‘Timestamps’, timeStamps); We collect the real time data from read channel and want process it before sending it to write channel, but the data values in the write channel replicate the read channel values for the following code. Could anyone give suggession how to get the processed data?
% Source ThingSpeak Channel ID for reading data
readChannelID = 2522808; % Replace with your source channel ID
% Destination ThingSpeak Channel ID for writing data
writeChannelID = 2522810; % Replace with your destination channel ID
% ThingSpeak Read API Key for the source channel
readAPIKey = ‘XXX’; % Replace with your read API key
% ThingSpeak Write API Key for the destination channel
writeAPIKey = ‘XXX’; % Replace with your write API key
%% Read Data %%
% Read all available data from the source channel
data = thingSpeakRead(readChannelID, ‘ReadKey’, readAPIKey, ‘Fields’, [1, 2]);
% Extract the values from the read data
values1 = data(:, 1); % Values from field 1 i.e. Estimated Voltage
values2 = data(:, 2); % Values from field 2 i.e. Input Current
% Determine the number of data points retrieved
numPoints = size(data, 1); % Assign the number of rows in the variable ‘data’ to the variable ‘numPoints’
% Generate timestamps for the data
timeStamps = datetime(‘now’) – minutes(numPoints:-1:1);
% Initialize Y arrays
Y1 = zeros(size(values1)); % Create a new array ‘Y1’ filled with zeros that has same size as the array ‘values1’
Y2 = zeros(size(values2)); % Create a new array ‘Y2’ filled with zeros that has same size as the array ‘values2’
% Perform the operation Y(i) = i * I(i) for each value in the read data
for i = 1:length(values1)
disp([‘Processing index ‘, num2str(i)]);
disp([‘values1(‘, num2str(i), ‘) = ‘, num2str(values1(i))]);
disp([‘values2(‘, num2str(i), ‘) = ‘, num2str(values2(i))]);
Y1(i) = i * values1(i);
Y2(i) = i * values2(i);
disp([‘Y1(‘, num2str(i), ‘) = ‘, num2str(Y1(i))]);
disp([‘Y2(‘, num2str(i), ‘) = ‘, num2str(Y2(i))]);
end
% Write the data to the destination channel with timestamps
thingSpeakWrite(writeChannelID, ‘WriteKey’, writeAPIKey, ‘Values’, [Y1′, Y2′], ‘Fields’, [1, 2], ‘Timestamps’, timeStamps); thingspeak, read channel, write channel, data processing MATLAB Answers — New Questions
Spli cell array directly at the function output
Hi,
I have a function returning two 1*n cell arrays as output, which I want to append to two existing cell arrays (variable1 and variable2). However, I don’t want to end up with nested cells arrays, so my code looks like this:
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ output1, output2 ] = myFunc();
variable1 = [ variable1, output1{:} ];
variable2 = [ variable2, output2{:} ];
In this case, is it possible to append the outputs to variable1 and variable2 and exploding the cells in only one line instead of 3. So something like this (which obviously does not work but it is just to be sure I am clear enough):
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ [ variable1, output1{:} ], [ variable2, output2{:} ] ] = myFunc();
Thanks for your help.Hi,
I have a function returning two 1*n cell arrays as output, which I want to append to two existing cell arrays (variable1 and variable2). However, I don’t want to end up with nested cells arrays, so my code looks like this:
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ output1, output2 ] = myFunc();
variable1 = [ variable1, output1{:} ];
variable2 = [ variable2, output2{:} ];
In this case, is it possible to append the outputs to variable1 and variable2 and exploding the cells in only one line instead of 3. So something like this (which obviously does not work but it is just to be sure I am clear enough):
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ [ variable1, output1{:} ], [ variable2, output2{:} ] ] = myFunc();
Thanks for your help. Hi,
I have a function returning two 1*n cell arrays as output, which I want to append to two existing cell arrays (variable1 and variable2). However, I don’t want to end up with nested cells arrays, so my code looks like this:
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ output1, output2 ] = myFunc();
variable1 = [ variable1, output1{:} ];
variable2 = [ variable2, output2{:} ];
In this case, is it possible to append the outputs to variable1 and variable2 and exploding the cells in only one line instead of 3. So something like this (which obviously does not work but it is just to be sure I am clear enough):
variable1 = { ‘var11’, ‘var12’ };
variable2 = { ‘var21’, ‘var22’ };
[ [ variable1, output1{:} ], [ variable2, output2{:} ] ] = myFunc();
Thanks for your help. cell array, function MATLAB Answers — New Questions
Parallelization is not working in Matlab
Hello,
I am trying to paralleliza my code in Matlab. Below is a part of my code.
Basically, I am finding the minimum position and the value given 4 state variables.
I want to speed up my code by using parallelization so I changed ‘for i_a = 1:Na’ to ‘parfor i_a = 1:Na’ but it doesn’t seem like Matlab parallelize the code because if I see the result at the end of each loop (disp([i_a i_d i_y i_t toc])), it seems like Matlab is calculating minimum value one by one. (And I don’t think the code is faster also)
Am I doing something wrong? (I don’t think there is false sharing issue here because the one I update is Vnew and Vnew is not used during the calculation)
for i_a = 1:Na %Loop over state variable a
for i_d = 1:Nd %Loop over state variable d
for i_y = 1:Ny %Loop over state variable y
for i_t = 1:Nt %Loop over state variable t
tic;
utilityadj = @(adjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))^relutility) * (adjf(2)^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))<=0)*(-1e10));
noadj_damount = (1-delta)*D(i_d);
if i_d == 1
noadj_damount = d_min;
end
utilitynoadj = @(noadjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)^relutility) * (((1-delta)*D(i_d))^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)<=0)*(-1e10));
lb = [a_min-10,d_min-10];
ub = [a_max+10,d_max+10];
a = [];
b = [];
aeq = [];
beq = [];
x0 = (lb + ub) / 2;
options = optimoptions(‘fmincon’,’Display’,’off’);
[adjchoice,adjval] = fmincon(utilityadj,x0,a,b,aeq,beq,lb,ub,a,options);
[noadjchoice,noadjval] = fmincon(utilitynoadj,a_min,a,b,aeq,beq,a_min-10,a_max+10,a,options);
Vnew(i_a,i_d,i_y,i_t) = -min(adjval, noadjval);
if Vnew(i_a,i_d,i_y,i_t) == -adjval
indpol_ap(i_a,i_d,i_y,i_t) = adjchoice(1);
indpol_dp(i_a,i_d,i_y,i_t) = adjchoice(2);
indadj(i_a,i_d,i_y,i_t) = 1;
else
indpol_ap(i_a,i_d,i_y,i_t) = noadjchoice;
indpol_dp(i_a,i_d,i_y,i_t) = noadj_damount;
indadj(i_a,i_d,i_y,i_t) = 0;
end
disp([i_a i_d i_y i_t toc])
end
end
end
endHello,
I am trying to paralleliza my code in Matlab. Below is a part of my code.
Basically, I am finding the minimum position and the value given 4 state variables.
I want to speed up my code by using parallelization so I changed ‘for i_a = 1:Na’ to ‘parfor i_a = 1:Na’ but it doesn’t seem like Matlab parallelize the code because if I see the result at the end of each loop (disp([i_a i_d i_y i_t toc])), it seems like Matlab is calculating minimum value one by one. (And I don’t think the code is faster also)
Am I doing something wrong? (I don’t think there is false sharing issue here because the one I update is Vnew and Vnew is not used during the calculation)
for i_a = 1:Na %Loop over state variable a
for i_d = 1:Nd %Loop over state variable d
for i_y = 1:Ny %Loop over state variable y
for i_t = 1:Nt %Loop over state variable t
tic;
utilityadj = @(adjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))^relutility) * (adjf(2)^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))<=0)*(-1e10));
noadj_damount = (1-delta)*D(i_d);
if i_d == 1
noadj_damount = d_min;
end
utilitynoadj = @(noadjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)^relutility) * (((1-delta)*D(i_d))^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)<=0)*(-1e10));
lb = [a_min-10,d_min-10];
ub = [a_max+10,d_max+10];
a = [];
b = [];
aeq = [];
beq = [];
x0 = (lb + ub) / 2;
options = optimoptions(‘fmincon’,’Display’,’off’);
[adjchoice,adjval] = fmincon(utilityadj,x0,a,b,aeq,beq,lb,ub,a,options);
[noadjchoice,noadjval] = fmincon(utilitynoadj,a_min,a,b,aeq,beq,a_min-10,a_max+10,a,options);
Vnew(i_a,i_d,i_y,i_t) = -min(adjval, noadjval);
if Vnew(i_a,i_d,i_y,i_t) == -adjval
indpol_ap(i_a,i_d,i_y,i_t) = adjchoice(1);
indpol_dp(i_a,i_d,i_y,i_t) = adjchoice(2);
indadj(i_a,i_d,i_y,i_t) = 1;
else
indpol_ap(i_a,i_d,i_y,i_t) = noadjchoice;
indpol_dp(i_a,i_d,i_y,i_t) = noadj_damount;
indadj(i_a,i_d,i_y,i_t) = 0;
end
disp([i_a i_d i_y i_t toc])
end
end
end
end Hello,
I am trying to paralleliza my code in Matlab. Below is a part of my code.
Basically, I am finding the minimum position and the value given 4 state variables.
I want to speed up my code by using parallelization so I changed ‘for i_a = 1:Na’ to ‘parfor i_a = 1:Na’ but it doesn’t seem like Matlab parallelize the code because if I see the result at the end of each loop (disp([i_a i_d i_y i_t toc])), it seems like Matlab is calculating minimum value one by one. (And I don’t think the code is faster also)
Am I doing something wrong? (I don’t think there is false sharing issue here because the one I update is Vnew and Vnew is not used during the calculation)
for i_a = 1:Na %Loop over state variable a
for i_d = 1:Nd %Loop over state variable d
for i_y = 1:Ny %Loop over state variable y
for i_t = 1:Nt %Loop over state variable t
tic;
utilityadj = @(adjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))^relutility) * (adjf(2)^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,adjf(1),adjf(2),YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R + (1-delta)*D(i_d) – adjf(1) – adjf(2) – fixed*(1-delta)*D(i_d))<=0)*(-1e10));
noadj_damount = (1-delta)*D(i_d);
if i_d == 1
noadj_damount = d_min;
end
utilitynoadj = @(noadjf) -(((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)>0)*((1/(1-elasticity)*( ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)^relutility) * (((1-delta)*D(i_d))^(1-relutility)) )^(1-elasticity)) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(1))*transition(i_y,1)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(1))*transition(i_y,2)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(1))*transition(i_y,3)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(1))*transition(i_y,4)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(1))*transition(i_y,5)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(1))*transition(i_y,6)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(1))*transition(i_y,7)*prob(1) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(1),T(2))*transition(i_y,1)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(2),T(2))*transition(i_y,2)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(3),T(2))*transition(i_y,3)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(4),T(2))*transition(i_y,4)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(5),T(2))*transition(i_y,5)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(6),T(2))*transition(i_y,6)*prob(2) …
+ beta * interpn(A,D,YS,T,V,noadjf,noadj_damount,YS(7),T(2))*transition(i_y,7)*prob(2)) …
+ ((wage*hour*YS(i_y) + T(i_t) + A(i_a)*R – noadjf)<=0)*(-1e10));
lb = [a_min-10,d_min-10];
ub = [a_max+10,d_max+10];
a = [];
b = [];
aeq = [];
beq = [];
x0 = (lb + ub) / 2;
options = optimoptions(‘fmincon’,’Display’,’off’);
[adjchoice,adjval] = fmincon(utilityadj,x0,a,b,aeq,beq,lb,ub,a,options);
[noadjchoice,noadjval] = fmincon(utilitynoadj,a_min,a,b,aeq,beq,a_min-10,a_max+10,a,options);
Vnew(i_a,i_d,i_y,i_t) = -min(adjval, noadjval);
if Vnew(i_a,i_d,i_y,i_t) == -adjval
indpol_ap(i_a,i_d,i_y,i_t) = adjchoice(1);
indpol_dp(i_a,i_d,i_y,i_t) = adjchoice(2);
indadj(i_a,i_d,i_y,i_t) = 1;
else
indpol_ap(i_a,i_d,i_y,i_t) = noadjchoice;
indpol_dp(i_a,i_d,i_y,i_t) = noadj_damount;
indadj(i_a,i_d,i_y,i_t) = 0;
end
disp([i_a i_d i_y i_t toc])
end
end
end
end parallel computing MATLAB Answers — New Questions
how to change the number of Newton method iterations
I am using the ksdensity as follows
ksdensity(a,b,’function’,’icdf’);
but I get a warning on the non-convergence.
I know that the kernel density first fit an initial inverse CDF and then refines the estimation using the Newton method. However, the newton iteration take 100 steps only and then stops. In order to see if I can converge I would like to increase this value.
Can anybody help to understand how to change such parameter (number of iterations)?I am using the ksdensity as follows
ksdensity(a,b,’function’,’icdf’);
but I get a warning on the non-convergence.
I know that the kernel density first fit an initial inverse CDF and then refines the estimation using the Newton method. However, the newton iteration take 100 steps only and then stops. In order to see if I can converge I would like to increase this value.
Can anybody help to understand how to change such parameter (number of iterations)? I am using the ksdensity as follows
ksdensity(a,b,’function’,’icdf’);
but I get a warning on the non-convergence.
I know that the kernel density first fit an initial inverse CDF and then refines the estimation using the Newton method. However, the newton iteration take 100 steps only and then stops. In order to see if I can converge I would like to increase this value.
Can anybody help to understand how to change such parameter (number of iterations)? ksdensity, warnings, iteration MATLAB Answers — New Questions
if my modis image on my DESKTOP HOW I OPEN IT??
AND HOW I EXTRACT HISTOGRAM BAND 31 , 20 OR 30 .. OR ALL TOGETHER FOR EXAMPLE ..
I DONT KNOWE ANY THING .. PLESE LET ME LOVE MATLAB !!
THX FOR HELP..AND HOW I EXTRACT HISTOGRAM BAND 31 , 20 OR 30 .. OR ALL TOGETHER FOR EXAMPLE ..
I DONT KNOWE ANY THING .. PLESE LET ME LOVE MATLAB !!
THX FOR HELP.. AND HOW I EXTRACT HISTOGRAM BAND 31 , 20 OR 30 .. OR ALL TOGETHER FOR EXAMPLE ..
I DONT KNOWE ANY THING .. PLESE LET ME LOVE MATLAB !!
THX FOR HELP.. modis MATLAB Answers — New Questions