回答済み
Error using fmincon, Supplied objective function must return a scalar value.
I'm not quite sure about the details of your problem but I think you want to do something closer to this. Note the objective f...

10ヶ月 前 | 0

回答済み
Substitute s for jw in a transfer function
Hi, I think you mean that you define your transfer function using (you forgot the tf() in your example) G = tf([1 2],[3 4 5])...

10ヶ月 前 | 0

| 採用済み

回答済み
how the series of 2 stable discrete-systems becomes unstable?
I think you are seeing some roundoff or other numerical issues. Higher order polynomials (in your case a 5th order polynomial) a...

10ヶ月 前 | 0

| 採用済み

回答済み
Extracting values from Nyquist Diagram in a personalized way
Without seeing your whole code it is a little difficult to be sure what the problem is, but it is most likely that the range of ...

10ヶ月 前 | 0

| 採用済み

回答済み
How to give my PI controller initial value?
If you want the inital output of your PI controller to be 1800 when the error signal is zero then set the initial value of the i...

10ヶ月 前 | 0

回答済み
New to matlab and not sure how to reduce to first order
Define y1 = y y2 = y' y3 = y'' % and then make a function f, for example put the code below into an m-file called f.m funct...

10ヶ月 前 | 0

回答済み
How do I update a variable in a nested loop?
If you want iter to increment inside of the inner loop you have to move the statement iter = iter+1; inside of the inner loop....

10ヶ月 前 | 0

回答済み
How to fix in Gauss formula
It looks like in your calculation of c in both the Jacobi and Gauss you should do a Matrix -vector multiply not an element by el...

11ヶ月 前 | 0

| 採用済み

回答済み
How can I replace images inside a folder with another image from different folder?
If I understand what you are trying to do I think the copyfile function should do what you want Type doc copyfile on the comman...

11ヶ月 前 | 0

| 採用済み

回答済み
How to create an array of files names from a structure created by 'dir' result?
This will put them into a cell array list = dir('*.txt') filenames = {list.name}

11ヶ月 前 | 1

回答済み
Correlation matrix graph using excel data
Get the data from the Excel worksheet into MATLAB matrices using readmatrix, then use MATLAB's corr function You can get docu...

11ヶ月 前 | 0

回答済み
How to combine two tables with measurements taken over the same range but different intervals?
Put the two sets of data into MATLAB timetables, then use the synchronize function to combine them

11ヶ月 前 | 0

回答済み
How can i start my systems response from 1 sec??
In Simulink, go to the Modeling tab, Modeling>Model Settings>Model Settings>Solver This will bring you to the Configuration Par...

11ヶ月 前 | 0

| 採用済み

回答済み
How do i round to two decimals without zeros at the end
I think this might do what you want fprintf('Dog detected at second %0.2f\n',idx(:))

11ヶ月 前 | 0

| 採用済み

回答済み
Dot indexing not supportedd
T = xlsread( ) returns an array of double values, not a table so T.xxx is not meaningful I suggest using readtable instead.

11ヶ月 前 | 0

回答済み
Breaking an algebraic loop
I usually put in a delay block with a relatively small value set for the one sample delay to break algebraic loops. If you use a...

11ヶ月 前 | 0

回答済み
How to find X value of given Y close to zero ?
Here's another approach that is maybe more obvious to understand x = [338.00 339.00 340.00 341.00 342.00 343.00] dat...

11ヶ月 前 | 0

回答済み
How to divide an n×2 matrix into the coordinates of n points and save them separately?
x = data(:,1) y = data(:,2)

11ヶ月 前 | 1

回答済み
How to display data from a table using fprintf?
fprintf ('The Maximum Number of Cases Are: %d on %f', X.DAILYCASES,X.DATE)

11ヶ月 前 | 0

回答済み
converting matrix to constant value in matlab function (Simulink)
Try a MATLAB Function block with the following, this worked for me function y = fcn(u,m) y = min(u(u>m));

11ヶ月 前 | 0

| 採用済み

回答済み
Select a range of rows in Excel
You should be able to use MATLAB's readmatrix function, e.g data = readmatrix('myfile.xlsx','Range','90:233') or if the start ...

11ヶ月 前 | 1

回答済み
Find group number from a range of data that is not fixed
Are your groups always as you show in your example? That is, group 1 = 1,2,..8 group 2 = 9, 10,..16, group 3 = 17,18, ...24 ?...

11ヶ月 前 | 2

| 採用済み

回答済み
How to design a charging and discharging circuit for my supercapacitor using only Simulink blocks without the simpowersystems
In general to model charging a capacitor in Simulink I would think about it this way. Go back to fundamentals The voltage on a...

11ヶ月 前 | 0

| 採用済み

回答済み
How to define Estimated Correlation Formula on MATLAB?
You are convolving y with itself and u with itself. You should be able to do this using the MATLAB conv function. You should al...

11ヶ月 前 | 0

| 採用済み

回答済み
Calculation of a given area using the trapz
You need to limit the range of x and y that are fed to trapz, you could do something like this, assuming your original variables...

11ヶ月 前 | 0

| 採用済み

回答済み
How to plot e^(-2n)
Assign a vector of equally space values over the range of interest to the variable n Assign a value y to a MATLAB expression th...

11ヶ月 前 | 0

回答済み
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
You need to use .^ for all of your powers. Also ./ for your divide, like this clear clc wn = 150; w = 3.142; wb = 0.50; re...

11ヶ月 前 | 0

| 採用済み

回答済み
Undefined function 'xline' for input arguments of type 'double'.
Is it possible that the university computer is running an outdated version of MATLAB? According to the documentation xline was i...

11ヶ月 前 | 3

| 採用済み

回答済み
why is my plot plotting blank?
The reason your plot is blank is because all of your y values are infinite. They are infinite because Cd is zero for all of your...

11ヶ月 前 | 0

回答済み
Numeric integration with Trapezoidal and Simpson's rule
You may have other problems too, but it looks like you clear all of your variables right after you just defined your limits and ...

11ヶ月 前 | 0

もっと読み込む