Réponse apportée
Solve a system of differential equations which has blkdiag
given i as identity with coeherent dimensions to x: blkdiag(x'.*i) edit: to create i use the eye(n) function, where n is the ...

plus d'un an il y a | 0

Réponse apportée
What is the purpose of this code?
line per line load signal; %load signal fs = 100; t = (1:length(signal))/fs; %create linspace (the time axis) for i = 1:100 ...

plus d'un an il y a | 0

Réponse apportée
to receive data from simulink and send to app designer
one option would be to have some to workspace blocks in the simulink file: Log data to workspace from Simulink model - Simulink ...

plus d'un an il y a | 0

Réponse apportée
I need the matlab code for the following equation. The values of the parameters in the equation is given .
try with this, assuming that the units don't need conversion : syms t mu=200; %cm^2*V^-1 * s^-1 R = 0.318; alpha= 6000; %c...

plus d'un an il y a | 0

| A accepté

Réponse apportée
how to extract double value from a string?
assuming the string is always formatted as such you could just: s='D:\MATLAB\noise_check\bilder\Image_230217_1227_Temp_ 42,75.p...

plus d'un an il y a | 0

Réponse apportée
How to separate Day side & Night side time stamps and corresponding VTEC data from whole months data ?
Try this and tell me if it is what you wanted: dayFilter=and(hour(Date)>=6,hour(Date)<=18); %creates a filter for day hours ni...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Why does the step response to my discrete system not match between MATLAB and Simulink?
Had the same problem earlier, it's late but it can be helpful for others i guess: instead of using the discrete transfer functi...

plus d'un an il y a | 0

Réponse apportée
Importing .mat files in a loop
let's say you are in the directory, then: matFiles=dir ('*.mat'); %finds all the .mat files (struct) [NoF,~]=size(matFiles); ...

plus d'un an il y a | 1

Question


Discrete input to continuous transfer function
I'm modeling a discrete pid to control a step response for a continuous system. From left to right: i have a continuous signal...

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

1

réponse

Réponse apportée
ode45 returns NaN
The values of t and T from iteration 1 to 5 are: t= 0.1 T=57.2 t= 0.1 T=59.4 t= 0.1 T=57.49 t= 0.1 T=377.82 t= 0.1 T=NaN ...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Can't progress on simulink onramp in MATLAB function block
you can try to either: copy paste the ^ symbol from here (an annoying procedure) use the function power (A,B). Notice that th...

plus d'un an il y a | 0

Réponse apportée
Why isn't a GoTo tag used in asbQuadcopter's Non-linear airframe block showing it's corresponding From tag outside that block and how to fix it?
The global scope can be useful to connect From and Goto blocks anywhere in the model BUT the location must be virtual. You canno...

plus d'un an il y a | 0

| A accepté

Réponse apportée
How to plot graphs successively using loop
I think the issue is with the if statement: if k==c since the plotting happens inside of the if statement it will only happen ...

plus d'un an il y a | 0

| A accepté

Réponse apportée
paths removed and Set Path saved yet removed paths reappear at start up
2 alternative methods i would try: 1. rmpath(genpath(topLevelFolder)); %in case it has subfolders that create issues genpath m...

plus d'un an il y a | 0

Réponse apportée
what is the error? Example?
there is a ';' in the function call on line 1: function w=ket(;5)

plus d'un an il y a | 0

Réponse apportée
dbstop if error: before it was stopping at error in my code, now set the break point into Matlab native functions
you can use the navigation bar on top of the editor. Here i'm inside matlab defined funciton Here i hop out and it points at...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Shuffle row order within every N rows in a matrix
i think this would do the trick: [rows,~]=size(m); if mod(rows,2)==0 %detects if even or odd number of rows half=rows/2; ...

plus d'un an il y a | 0

Réponse apportée
Plot a color bar for parallelplot?
This is the list of parallelplot properties Control parallel coordinates plot appearance and behavior - MATLAB (mathworks.com) a...

plus d'un an il y a | 0

Réponse apportée
Detecting peaks with a specified range of amplitudes?
use the findpeaks() function: Find local maxima - MATLAB findpeaks (mathworks.com) if you need the range [0 1] just filter it o...

plus d'un an il y a | 0

Question


Fuzzy logic rule for out of range
I implemented a fuzzy logic penalty system for a particle swarm algorithm i'm working on. Sometimes it may happen that the val...

plus d'un an il y a | 2 réponses | 1

2

réponses

Question


mesh or surf from x y z coordinates
I'm not experienced at all with meshes or 3d plotting, please be patient. I have a firefly algorithm that optimizes pid paramte...

plus d'un an il y a | 2 réponses | 0

2

réponses

Réponse apportée
Accessing and synchronizing timetables in cell array?
[cMax,~]=size(mr2); C=mr2{1} %needs the first 5 elements of the table as preallocation for ii=1:cMax C=[C ; mr2{ii}]; %ve...

plus d'un an il y a | 0

Réponse apportée
Commiting and pushing files from MATLAB to Github using MATLAB script
assuming you already cloned your repository in a local directory and already made the checkout of the branches, just move to th...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Store structure output into an array that you can index
i would either store it in a 1xn struct (n is the number of outputs you want to store): for (your current loop condition, i'll ...

plus d'un an il y a | 0

| A accepté

Question


Data type conversion changes the value of the signal
Any clue why this happens? For reference this is how the signal is defined: I guess the offset has something to deal with i...

plus d'un an il y a | 2 réponses | 0

2

réponses

Réponse apportée
hello i want to loop this function, anyone can help me? thank you
Xtr=[Xtr1 Xtr2 Xtr3 Xtr4 Xtr5 Xtr6]; Ytr=[Ytr1 Ytr2 Ytr3 Ytr4 Ytr5 Ytr6]; mdl=[]; for jj=1:lenght(Xtr) mdl(jj)=fitlm(X...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Why is the run command not visible on my command bar (tool ribbon)?
Without more context i would guess that: a. you don't have a script open b. you are not in the editor

plus d'un an il y a | 0

| A accepté

Réponse apportée
How to write this fuction in Matlab? I have an example code in Python
b= @(r) b1 - ((b1-b2)*(r-r1))/(r2 -r1); where b1,b2,r1,r2 are constants

plus d'un an il y a | 1

Réponse apportée
How to slove it (using matlab)
Try this: syms t x= (-2.41* 10^5)*(exp((-0.4607*t)))*sin(3.0003*t); %position expression v= diff(x); %speed as a first deriv...

plus d'un an il y a | 0

| A accepté

Question


Account migration to a new organization
Soon i will change my organization so i will need to migrate matlab to my new one. This implies: - a change in the email/...

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

1

réponse

Charger plus