已回答
Numerical precision in subtracting two almost identical variables?
Here is your answer link Its all in the low level things. If you display your values with 'format hex', you will see they diffe...

7 months 前 | 0

已回答
Solution of Growth problem
You overwrite the y0 and t variable within the function with this code: y0 = [100; 300; 500; 125; 100; 200]; t = 3; So the u...

7 months 前 | 2

已回答
Creating multiple cylinders in different coordinates
Not sure how you want them to look or what you need but here is one simple way [X,Y,Z] = cylinder(2); % create X,Y,Z coordinate...

7 months 前 | 0

已回答
How to write test case for mil and sil testing
This is a realy broad question without any specifics. I would check the Mathworks page to learn more where they provide examples...

7 months 前 | 0

已回答
Defining and calling functions in MATLAB
So if you want to define them in a single script, the function needs to be at the bottom. And as others mentioned you might wan...

7 months 前 | 1

已回答
Plotting 2 x-axes against 1 y-axis
I think this is what you are looking for, see the example for Display Data with Multiple x-Axes and y-Axes

7 months 前 | 0

已回答
How to optimize a parameter, influencing the dynamic response of a control system
Here is a brute force way: desired_ratio = 4; Kc_vec = 0.1:0.01:10; % Kc search range ratio = NaN(size(Kc_vec)); % initiali...

7 months 前 | 2

已回答
Calculate number of sprints based on sprint and time data
Based on another answer here, find below a solution: clear ,clc Fs = 1e3; % sampling rate dt = 1/Fs; t = 0:dt:100; % t...

7 months 前 | 1

| 已接受

已回答
How to make a sequence of time and the corresponding data from a data set where time is not provided sequentially
You cannot fill the gaps in your data without physically taking more data or interpolating. However if your problem is to order...

7 months 前 | 1

| 已接受

已回答
How to display the values of a Stateflow local data during simulation.
I think this is what you are looking for. Essentially you define the variable in your stateflow as a logged data (from Property...

8 months 前 | 0

已回答
Transfer function extraction from frequency response
First of all, bode command does not give you numerator and denominator. It gives you magnitude and phase of the system, or FRD i...

8 months 前 | 0

已回答
vectorized operations on symbolic functions
Yet another method, you can define your symbolic parameter as a matrix symbolic n = 500; X = sym('X', [500 3]); % I assume ...

8 months 前 | 0

已回答
c2d transformation from s domain to z domain
For forward Euler method, plug in s = (z-1)/T where T is your sampling time For backward Euler method, plug in s = (1-z^(-1))/T...

8 months 前 | 0

已回答
Why is my code returning incorrect result?
You might wanna provide the equations yu are trying to implement. Otherwise, unless someone is already familiar with the equatio...

8 months 前 | 0

| 已接受

已回答
User input in a struct
You cannot have space in structure field name. And also as @Dyuman Joshi mentioned you should not use quotes when you assign it....

8 months 前 | 1

| 已接受

已回答
write the results of two for loops with different indexes into an matrix
You need to provide more info for a better help. However here is my attempt with the limited info. There are a couple reasons ...

8 months 前 | 0

已回答
how to find out the index of a cell array that cell contains my substring?
Using the @Fangjun Jiang example, how about myCellArray = {'John','Mike','foo','Jonathan','Stuart','Martha','Jo'}; substring =...

8 months 前 | 1

已回答
how to fix the scale in the output window
You need to be more specific for a better answer but here is my attempt: If you just want to see x axis from -0.1 to 0.1 then ...

8 months 前 | 0

| 已接受

已回答
How to set continue function?
You are looking for assert() function. When you condition is satsified assert(1>0,'STOPPED THE CODE!') fprintf('Code continue...

8 months 前 | 0

| 已接受

已回答
Foor loop; iteration
You set your tolerance to 1e-2 so your for loop terminates when abs(V-V_Check) becomes less than 1e-2. % here you basically def...

8 months 前 | 0

已回答
Figure Output blank but no errors
When you call freqz with outputs, it does not draw a plot as written on the description of the function. So you need to do [h,w...

8 months 前 | 0

已回答
How to modify the code to compute data on multiple inputs?
Next time please copy paste the code, not screen shot :D You did not provide full info to get an answer since I have no idea h...

8 months 前 | 0

已回答
How to find all the intersecting points between 4 spheres ?
You can use symbolic toolbox for this. However I dont think your 4 spheres intersect. S1 = [1;1;1]; S2 = [2;1;1]; S3 = [1.5; ...

8 months 前 | 0

已回答
Understanding the following lines of code
My guess is the code is used to generate a name for a mat file after performing some postprocessing on raw data from 'file_px'. ...

8 months 前 | 0

已回答
With ischar usage - I get two different answers
"a" is a string not a char. You use double quotes for strings single quote for char. isstring("a") ischar("a") isstring('a') ...

8 months 前 | 0

| 已接受

已回答
Why does my Nx2 matrix turn into a 1x1 when I pass it into a MATLAB Function block
Your matrix you are getting from workspace needs to be Nx3 in your case, where the 1st colum is time, 2nd and 3rd column are you...

8 months 前 | 0

已回答
Two colormaps in a figure
This answer might help.

9 months 前 | 0

已回答
Defining an improper function in Simulink
Firstly, I do not think you understand the viscous friction model. Ms2+Ws is probably not what you think it is. To answer your...

9 months 前 | 0

已回答
How can I plot the graph with the highest, lowest and middle values?
do you know of functions min(), max() and mean()? Example % generate random data t = (0:0.01:10)'; x = exp(-.2*t).*(2+(2*rand...

9 months 前 | 0

已回答
How to remove the third to last element of an array?
% put the index to be removed in paranthesis, if you want to remove 99th % index, put 99, otherwise you can use 'end' to mean '...

11 months 前 | 0

加载更多