質問


the colors red, blue, yellow repeated again in my plot, how I can give each curve in the plot different color
clc; clear; K=1:30; for i=1:10 C_T=i*log(K); plot_T = plot(K,C_T,'-O','LineWidth',2); hold on grid on title('Total C...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I have P=[2 3 4 0 5 1 0 2 ]; and I want to create a loop to remove zeros from P and calculate C, description in the code
%% , for example P=[2 0 4 0 5 1 2 0 ]; and after the first iteration P=[2 4 0 5 1 2 0]; and second iteration P=[2 0 4 5 1 2 ...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


the (if statement) condition happens only ones but I want to repeat this if (F Zero) is still not empty
if (~isempty(F_Zero)) %There is Zeros (not empty) W(:,F_Zero) = []; % Remove the columns of W HT(F_Zero,:...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


if you run F Zero you will get [2 5], I want to delete the column number 2 and 5 from the Matrix W, but the problem is when I'm deleting the columns it deletes number 2 and 6
clc; clear; W=rand(6) Pt=10; Pn=[2 7 3 2 8 4]; P = waterfill(Pt,Pn); F_Zero=find(~P) %Find Zeros %% delete the col...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


How I can separate my code and let it run in parallel, because for loop is making the code execution very slowly
clc; clear; M=60; N=(linspace(6,10,5)).^2; %Number of Elements IRS K=linspace(4,10,7); %Number of Single Antennas UE L = ...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I want to change the for loop to speed up my code
clc; clear; M=60; N=(linspace(6,10,5)).^2; %Number of Elements IRS K=linspace(4,10,7); %Number of Single Antennas UE L = ...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I specified more parameters to GA in order to speed up my code execution by using (optimoptions), I want to know the best values ​​for these parameters and the meaning of it
opts = optimoptions(@ga, ... 'PopulationSize', 150, ... 'MaxGenerations', 200, ... ...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


difference between Optimization terminated: maximum number of generations exceeded and Optimization terminated: average change in the fitness value less than .
1- Optimization terminated: average change in the fitness value less than options.FunctionTolerance. 2- Optimization terminated...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


How I can specify more parameters to GA in order to speed up my code execution. with the help of (optimoptions function of ga).. opts = optimoptions(@ga,
%% Genetic Algorithm FT=@(x)-Genetic_A(x); A = []; % No other constraints b = []; Aeq = []; beq = []; lb = zeros(1,n); ub...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I want to save my figure in another path. Every time I used the command save figure it saved in Desktop how I can change it
clc; clear; N = [10 20 30 40 50]; M = [1 2 3 4 5]; K=[1 3 5 6 7]; x = linspace(0, 1, 17); legendString = "N = " + string(N...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I want to see N,M first and then K,M in the same legend. I can see only N,M like the attached picture.
clc; clear; N = [10 20 30 40 50]; M = [1 2 3 4 5]; K=[1 3 5 6 7]; x = linspace(0, 1, 17); legendString = "N = " + stri...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


I want my legend just like the pic. 2 variables in 2 columns at the same legend
clc; clear; N = [10 20 30 40 50]; M = [1 2 3 4 5]; x = linspace(0, 1, 17); plot(x, N.*x.') legendString = "N = " + strin...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


Three phase sinus wave plotting with degrees
Hello, I would like to plot three phase sinus wave with time perriod converted to degrees. I need to get all phases into 0-360 i...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


Three phase sinus wave plotting
Hello, I woul like to ask how can edit my sinus wave time period, cause now i nor able to plot proper sinus wavew by method whi...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


The Average of the Matrix G with the dimension (M,n) that I'm repeating 3 times in a loop so I'll have 3 matrices of G (M,n) and I want to take the Average of these 3 matrices so I can get only one matrix of G(M,n) represent the Average of them)
clc; clear; M=5; n=3; freq = 28e9; lambda = physconst('LightSpeed')/freq; d_BS=lambda/2; %Inter-antenna separation atthe BS. d_...

3年弱 前 | 2 件の回答 | 0

2

回答

質問


High Resolution fft2 image
Hello All, Please help me on the following- I need to construct an Fourier Transormed image such an Fig.1, But so far I have go...

3年弱 前 | 1 件の回答 | 0

1

回答

質問


Power loss minimisation using fmincon
I need to minimise my power losses using fmincon with constraints. the Values that i am using are: Vm=230; Rmk=0.0246; Rkn=0.0...

約3年 前 | 3 件の回答 | 1

3

回答

質問


Program that sums as many numbers as user wants
I need to write a program that displays the sum of user-provided numbers. The user should be able to provide as many numbers as ...

約3年 前 | 1 件の回答 | 0

1

回答

質問


How do I indicate phase changes on my velocity versus time plot on MATLAB?
I have a graph that plots velocity versus time and I have to indicate where/which data point on the plot accelerates, stays cons...

約3年 前 | 1 件の回答 | 0

1

回答

質問


Runge-Kutta 4th Order on a 2nd Order ODE
I am dealing with the following 2nd order ODE: With initial conditions of: , , . and should be 3.24 I have found the sys...

約3年 前 | 2 件の回答 | 0

2

回答

質問


How can I create a 3D array?
for i=1:n-1 Image2 = uigetfile('*p*'); ImageArray2 =imread(Image2); MDArray = cat(3,ImageArray,[ImageArray2])...

3年以上 前 | 1 件の回答 | 0

1

回答

質問


Subtraction matrix for all values
column 1 - column 2; column 1 - column 3; column 1 - column 4...(rest of subtractions)..olumn 4 - column 4. How would I appr...

3年以上 前 | 1 件の回答 | 0

1

回答

質問


Not sure how to solve equations using newton-Raphson method
Can anyone help me solve these two equation using newton-raphson method 5/2*cos(x(1))+3*cos(x(1)+x(2))-5 5/2*sin(x(1))+3*sin(x...

3年以上 前 | 1 件の回答 | 0

1

回答

質問


Does anyone have any resources for modelling a distribution network and charging an electric vehicle from it
I want to do a project that solves an optimisation task for Electric Vechile charging from the Low-Voltage power network. Howeve...

3年以上 前 | 1 件の回答 | 0

1

回答

質問


Filenames in MATLAB - directory
Hello, So currently, what I'm doing it's prompting out window to select folder, I then was thinking of using a foor loop that ...

3年以上 前 | 1 件の回答 | 0

1

回答

質問


Export_fig - Ghostscript program not found
Hi, I downloaded the export_fig zip from https://github.com/altmany/export_fig named 'export_fig-master'. I unzipped the fil...

4年弱 前 | 1 件の回答 | 0

1

回答

質問


for loop with a spread
Hi guys, I wanted to get an idea on how I should approach a problem. Say for example I have a 100x48 matrix and I want to get ...

4年弱 前 | 1 件の回答 | 0

1

回答

質問


How to display images from nifti file format in Matlab?
I have a COVID-19 CT segmentation dataset where all images are in .nii file format. Each image file has mulitple slices (512*51...

4年弱 前 | 1 件の回答 | 0

1

回答

質問


String scalar or character vector must have valid interpreter syntax.
I want to add: ylabel('$\mid H(f) \mid$ (kg{s^{-1}}/kg{s^{-1}})', 'interpreter', 'latex'); Where I want the first part ins...

4年弱 前 | 1 件の回答 | 0

1

回答

さらに読み込む