Réponse apportée
How to make a nonperiodic signal periodic?
I had the same idea of @William Rose, here is a possible implementation clear variables, close all % anonymous function v...

environ un an il y a | 3

| A accepté

Question


Calculate streamlines using ODE
Hi Matlab Gurus, I have read many posts in this forum about my problem but I'm still not capable to solve it. I'm trying with a...

plus d'un an il y a | 1 réponse | 0

1

réponse

Réponse apportée
i dont know why there is no anwser about this 'solve'
Your call to solve is incorrect clear all syms a b k equ2= a==20; equ3= b==20; equ1= k==sqrt((a+10)^2+b^2)-sqrt((a-10)^2+...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Solve system of simultaneous equations for only real numbers
I tried with a numerical solution clear all; a = [0.0094; 7.0888e-04; 0.7627; 0.1656]; c3 = 0.95; % variable mapping % ...

plus d'un an il y a | 0

| A accepté

Réponse apportée
select and extract only some coordinates of a 3D object
Is this what you are asking? % your code rabbit = importdata("rabbit.txt"); figure plot3(rabbit(:,1), rabbit(:,2), rabbit(:,...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Convert these lines to Curves
You can interpolate your data using interp1. Warning: the interpolation may be not accurate for your trend, in this case is on...

presque 2 ans il y a | 0

Réponse apportée
Numerical integration "backwards" for ODE45
you may be interested to read the comments to this post https://www.mathworks.com/matlabcentral/answers/4592-numerical-integrat...

presque 2 ans il y a | 1

Réponse apportée
How to evaluate integral from 0 to inf of besselj(0,kr) * besselj(0,kR) * 1/k * (2 - e^-kz - ek(z-L)) dk
For the numerical integration, you can use integral, that also accepts Inf as integration upper bound clear variables, close al...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
Contourf and Surf with repeated values
Suppose you have Nx divisions along the variable of the first column and Ny divisions along the variable of the second column. Y...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
I want to write a script that reads an input text file that specifies the parameters and then uses them to solve an integral
As suggested by @Torsten your problem is a system of first order ODEs and you must use a ODE integrator. Try this clear variabl...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
Define Integral in Matlab
Suppose to have these data The simulink model is calulating you can calulate the integral in the discrete form with cumtra...

presque 2 ans il y a | 0

Réponse apportée
How to plot faster instead of for loop?
Try using cellfun clear variables, close all load data.mat % index to [0 0; 0 0] matrices index1 = cellfun(@(x) isequal(...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to draw an Elliptical Arc by given radius (rx and ry) and start/end points ?
I am a little lazy to do the math, so I have found this reference for the two parameters a and b that describe an ellipse. http...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to plot with bar3 plot in MATLAB?
Check the code below, Hope it helps clear variables, close all B = [86, 82, 80]; B2 = [91, 88, 85]; B3 = [98, 95, 89]; ...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
How to reduce the size of legend in a fig file?
You can try playing with the 'location' optional input, for example using legend('blabla1','blabla2','Location','bestoutside') ...

environ 2 ans il y a | 0

Réponse apportée
How can I find fft of this function
try with fft

environ 2 ans il y a | 0

Réponse apportée
Convert german numbers from excel to matlab (change comma versus point)
You may try to use readtable to import your data. It reads excel files and has the option 'DecimalSeparator' that can be set to ...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Create multiple copies of one file in multiple directories with different names
Try this. Note: the file A.txt must be in the current folder % data N = 10; dirName = 'Folder'; fileName = 'A'; % loop ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to rotating a stl object
You shoud translate the points p before the rotation and then move them back If R is your rotation matrix and the center of rot...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Very tricky:Manipulation with complex array
Following @Paul suggestion % original vector X = [4, 1, 1, 3, 8, 12]; % reshape to have 2xN vector W = reshape(X,2,[]); ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Minimal-code to get axes limits of log-log plots, but using gscatter
You can remove the negative part of the axis before setting the log scale set(gca,'XLim',[0 max(xlim)],'YLim',[0 max(ylim)]); ...

plus de 2 ans il y a | 0

Réponse apportée
How to plot Temperature vs Efficiency curve using For loop and Linspace?
I have commented your plots to avoid moltiple figures % numebr of temperatures nT = 100; % temperature vector T = linspace(2...

plus de 2 ans il y a | 1

| A accepté

Question


Calculation of consistent initial conditions for ODE
(minor edit) Hi everyone, I have written wrapper functions calling MATLAB's ODE solvers. Specifically, my problems are DAEs wi...

plus de 2 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to find same unique in two different size arrays?
Use ismember % data x=[1 22 22 3 8 19]; y=[22 10 19 35]; % engine [iii,jjj] = ismember(y(:),x(:)); countCommon = su...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Having trouble using for loops to create a matrix
I reproduce the result of the picture, because the question is not clear. a = 25 ; b = 5 ; c = (2*a)/b - 1 ; % do not use mi...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to plot a function
You may use fplot figure, hold on fplot(@(x)x.^-3,[1 1e5]) fplot(@(x)x.^-2.8,[1 1e5]) % use bi-logaritmic scale set(gca,'...

plus de 2 ans il y a | 1

Réponse apportée
Ax = 0 with 2 values of x known
The post is old but the question arises many times, so I post here my solution. It is a generalization of @Matt J solution. Sup...

plus de 2 ans il y a | 0

Réponse apportée
Looking for visualization method to present finite difference numerical solution in 2D
You may use the low-level patch function. Since I don't have your data, please find below a self-consistent example showing the ...

plus de 2 ans il y a | 0

Réponse apportée
smooth step function with rise time
My colleague Sofia have found a paper [1] where authors report the analytic approximation of the piece-wise linear step function...

environ 3 ans il y a | 2

| A accepté

Question


smooth step function with rise time
Hi everyone, I know this question is more related to math than Matlab, but I know there are many gurus out there who can easily...

environ 3 ans il y a | 2 réponses | 2

2

réponses

Charger plus