Respondida
How to delete a Matrix in a 3D Matrix?
You are trying to change the size of the matrix that can't be achieved in this way. If you need to find and substitute NaNs with...

alrededor de 4 años hace | 0

Respondida
How do I make a figure legend multiple lines?
This one is a better solution that is easier to implement: plot(sin(1:.1:10),'r', 'DisplayName', 'Cosine'), hold on plot(cos(1...

alrededor de 4 años hace | 7

Respondida
finite element for 1d poisson equation
You can employ matlab's PDE toolbox fcn pdepe(). How to use it: doc pdepe Also, you can find some good help in this DOC.

alrededor de 4 años hace | 0

Respondida
Image analysis for Signal processing help
Using the Discrete Cosine Transform is quite straightforward. You'd need to employ dctmtx() fcn. Help documentation: doc dct...

alrededor de 4 años hace | 0

Respondida
Image analysis for Signal processing help
Use imcrop() How to use this function: >> doc imcrop

alrededor de 4 años hace | 0

| aceptada

Respondida
Perform fminsearch to find the best value for the variable in a model
One pranthesis was missing: ... for ii = 1:numel(Imeas) Itheory = @(Ro)(Imeas(ii)*exp(-Ro*-2*bet_a*k*2*Ro*(1-(y(ii)/Ro)^2))...

alrededor de 4 años hace | 0

Respondida
How do you obtain the equation of the Adaptation mechanism adjusts in the MRAC PID block?
It is found here: Simscape / Electrical / Control / General Control If your MATLAB/Simulink package has Simscape toolbox. Yo...

alrededor de 4 años hace | 0

Respondida
Perform fminsearch to find the best value for the variable in a model
Note the following two points in your code that must be identical and input variable names must match as defined above: Itheory...

alrededor de 4 años hace | 0

| aceptada

Respondida
Keyboard shortcuts are not mapped correctly to different language keyboard
Use preferences options to adjust your keyborad shortcuts, e.g.: >> preferences follow: Preferences -> keyboard -> Shortcuts ...

alrededor de 4 años hace | 0

Respondida
How to detect rotation in a trajectory?
One way of detecting the region of values is using logical indexing, e.g.: t = ... x = ... y = ... % Way 1 Ind = t>=0 &...

alrededor de 4 años hace | 1

Respondida
Perform fminsearch to find the best value for the variable in a model
There are a couple potential of errs in your code. (1) Ifunc fcn has to have two more input variables, viz. bet_a, k and thus, w...

alrededor de 4 años hace | 0

Respondida
Laplace Transform of Given Differential Equation
Note that if your system has "zero" ICs and not excitation force; therefore, your system solution (response) will be zero. If yo...

más de 4 años hace | 0

Respondida
It is Simulink Related
See the attached screen shot how to perform a search.

más de 4 años hace | 0

Respondida
Import .csv files in my folder directory.
probably, you'd better use a loop, e.g.: for ii=1:Number_csv % Number of *.csv files D{ii}=readmatrix(strcat(num2str(i...

más de 4 años hace | 0

| aceptada

Respondida
Laplace Transform of Given Differential Equation
Laplace transform does not work at t ~0 initial conditions and thus, here dsolve() might be a better option, e.g.: syms y(t) D...

más de 4 años hace | 0

Respondida
How to Identify Range of Frequency which is Noise from FFT Freq Domain graph
Your filtered signal is not quite noise free as it shows here from your script, and your obtained FFT is not quite correct. [x,...

más de 4 años hace | 0

Respondida
MATLAB gives the integer value of subtraction when the difference between numbers is large.
Specify flotaing point format accordingly, e.g.: a=[1;1;1;1]; b=[10^23;10^23;10^23;10^23]; c=a-b fprintf("%1999.0f \n",c) ...

más de 4 años hace | 0

Respondida
how to pull correct h into h(i)
Hi, You meant A(2,2) to have h=6.5929, A(3,3) to have h = 6.0625, correct? If so, you can adjust your loop by adjusting inde...

más de 4 años hace | 0

| aceptada

Respondida
Integration containing multiple variable and plotting
Use integral3: https://www.mathworks.com/help/matlab/ref/integral3.html

más de 4 años hace | 0

Respondida
cannot add path on mac
Maybe in mac, this way works: addpath(genpath('/Users/maherheal/Applications/CPLEX_Studio128/cplex/matlab'))

más de 4 años hace | 0

Respondida
Protect Matlab/Simulink Files
One option is creating p-code of m-files, e.g.: >> pcode MYfile.m

más de 4 años hace | 1

| aceptada

Respondida
Projectile Motion With Air Resistance Vs. Free-Falling with Air Resistance
You can add the free fall plot using simply, e.g.: ... xfall=x(1)*ones(size(x)); yfall = linspace(0, h, numel(y)); plot(xfal...

más de 4 años hace | 1

| aceptada

Respondida
why looping just save the last value of iteration
Because the indexes are missing, e.g.: data_diff(??) = out.Vo.signals.values-v_data; lse(??) = lse(??) + (data_diff'*data_diff...

más de 4 años hace | 0

Respondida
Startup view for a Simulink model.
See the attached example.

más de 4 años hace | 0

Respondida
Startup view for a Simulink model.
Hi, Hit your highest level system model on the left top corner of the model browser and then save your model. That would give...

más de 4 años hace | 0

| aceptada

Respondida
for loop forward modelling
You can start working somewhat in this way: ... rho = 2600; % Note density can't be negative. for ii = 1:2 f...

más de 4 años hace | 0

Respondida
3D Plotting with symbolic variables
If it is a symbolic expression, use fmesh(). Here is a good doc how to employ it: https://www.mathworks.com/help/matlab/ref/fmes...

más de 4 años hace | 0

Respondida
Script too Long to Run
Here is a little simplified version of your code: clc format long n=1e4; x1=zeros(n,1); x2=x1; x3=x1; x4=x1; error=x1; ...

más de 4 años hace | 1

| aceptada

Respondida
How to fill the area between two curves?
Here are a couple of good examples how to achieve this task: https://www.mathworks.com/matlabcentral/answers/180829-shade-area-...

más de 4 años hace | 0

Respondida
Rearrange a given array
A = [1 2 3 4 5 6 7 8 9 10 11 12]; B = sort(A(:), 'descend'); C= reshape(B, 3,4)...

más de 4 años hace | 1

Cargar más