Réponse apportée
Not enough input arguments
Perhaps you have added the control system toolbox since last time this worked? That toolbox contains a function named pid that ...

plus de 3 ans il y a | 0

Réponse apportée
How do I get the text command to display my character string in one line on a plot?
r = pi; % arbitrary value for testing {'r =' r} % Matlab will put each element of a cell array on a different line in text, tit...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Using rmoutliers without a for loop
From the documentation of rmoutliers: B = rmoutliers(A) detects and removes outliers from the data in A. If A is a matrix, the...

plus de 3 ans il y a | 0

Réponse apportée
Significant digits in a matlab figure
plot(rand(1,20)) grid on xtickformat('%.3f')

plus de 3 ans il y a | 1

Réponse apportée
Convert datetime to numeric - preserve date format
Edited to work with datetime array vs a single datetime. d = datetime(['2023-02-27 14:00'; '2023-02-27 15:00']) % test data - r...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Intersection of two tables
A = table(); A.user = ["user1";"user2";"user3";"user4"]; A.value = [10;20;30;40] B = table(); B.user = ["user3";"user4";"u...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I plot 5e^(0.5t)sin(2*pi*t)
t1 = 0:10; e = exp((0.5)*t1); num6 = (5).*e.*sin((2)*pi*t1); plot(t1, num6, 'c') grid on You are plotting your exponential ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
I want to disable a subsystem at time 30 secs where the simulation execution time is 50 secs.How this can be done
I would recommend reading this page in the documentation. You can drive the enable input with the output of a less than block c...

plus de 3 ans il y a | 0

Réponse apportée
How I would determine if a string contains multiple substrings?
myString = "This has some words in it."; if contains(myString, "This") && contains(myString, "some") disp Yes else d...

plus de 3 ans il y a | 0

Réponse apportée
How to plot a trajectory with varying colour?
Take a look at this Answer which shows a trick for doing this using surface. https://www.mathworks.com/matlabcentral/answers/50...

plus de 3 ans il y a | 0

Réponse apportée
why do i get the error using alpha too many output arguments, can anyoen help please.
You get this error because you haven't defined alpha before Matlab tries to execute this line of code CE = DE*cos(alpha); Sinc...

plus de 3 ans il y a | 0

Réponse apportée
How to solve this matrix equation
Since there are more equations than unknowns, there is no unique solution. A least-squares solution can be found using the \ op...

plus de 3 ans il y a | 0

Réponse apportée
How to add commented description on new scripts
Perhaps this answer will help you do what you want: https://www.mathworks.com/matlabcentral/answers/354093-generate-custom-new-...

plus de 3 ans il y a | 0

Réponse apportée
Move x-axis labels below the axis after relocation
I think we are going to need to see more of your code to figure out what is happening. It seems to work for me (I tried it in m...

plus de 3 ans il y a | 0

Réponse apportée
truncated plot displayed adding the size
figure('DefaultAxesFontSize',16) semilogy([45,45],[10^-5,1],'--r') hold on semilogy([80,80],[10^-5,1],'--r') xlabel ('x','Fo...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to call bash script in App Designer?
Read the documentation for this command: system

plus de 3 ans il y a | 0

Réponse apportée
Using 'while' loop to check if a file has been added to path
I would actually expect that your while loop wouldn't execute at all, since var.m is a standard Matlab command for calculating v...

plus de 3 ans il y a | 0

Réponse apportée
Shading between two plot lines, then removing the outline
x = 0:0.01:4*pi; % create some fake data to plot y1 = sin(x); y2 = y1 + 0.2*x; figure % hold all % plot(x,y1,'color',[0.8...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I align decimal points in a table?
I think I found a solution. Use the Figure Space s = compose('%10.4f', 50*rand(5,1)); snew = cellfun(@(c) strrep(c, ' ', char...

plus de 3 ans il y a | 1

Réponse apportée
how can i show up to 6 periods of this signal only, while being able to see the top and bottom of the wave?
Check out this section of the documentation: zoom xon This can also be done interactively but it is harder to explain. See thi...

plus de 3 ans il y a | 1

Réponse apportée
Is there a function similar to "where"?
Yes it is called logical indexing. The exact details depend on what type of data you have. A plain numeric matrix, a table, a ...

plus de 3 ans il y a | 1

Réponse apportée
Calculate the difference between minimum values of a parabola and straight line (from a plot)
Maybe this? W = 60000; S = 28.2; AR=7; cd0 = 0.02; k = 0.04; RC=0.51; clalpha = 2*pi; Psl=741000; hv=0:1:10; cdminp=4...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How would I plot the function p(x)=e^(-0.5x)*(4-x)-2 in the range of -2 to 10 as well as its derivative?
You had the '.' characters in the wrong place; they go right before the '*' to get element-by-element multiplies. x = -2:0.1:1...

plus de 3 ans il y a | 2

| A accepté

Réponse apportée
How to make a line-plot? Time series
Maybe this is what you are looking for. This isn't very pretty using the small sample dataset but maybe it will look better wit...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I have simple divisions between integers and I always get another integer as the answer. But I want at least three decimal places. I am using MATLAB R2022b
How were B and C created? If they really are integers (e.g., class int32), then that is the expected result. The default type ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Arguments accept char, string or "cellstr" (cell array of char or string)
Interesting issue. Looks like you have to create a "custom validation function". See if something like this works for you. a ...

plus de 3 ans il y a | 1

Réponse apportée
How ro fix the "Error using alpha Too many output arguments"?
Did you mean this line tic;[flow2,energylist2]=mexDiscreteFlow(sift1,sift2,[alpha,alpha*20,60,30]);toc to actually be this ins...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot a variable increasing in a for loop
You should read this documentation page: Array Indexing Also, I would recommend taking the time to go through the online tutor...

plus de 3 ans il y a | 0

Réponse apportée
Variable as placeholder in an "fopen" statement
The way I would do this is this subject = "PO1"; folder = "/Users/addison/Documents/Data/"; filename = "Results2" + subject +...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Extract data points from a plot corresponding to the plot legend
fig = openfig('ExampleData.fig'); % open and get a handle to the figure % get(fig); ax = get(fig, 'CurrentAxes'); % get handle...

plus de 3 ans il y a | 0

| A accepté

Charger plus