Answered
(0) I couldn't run this code on Matlab. I want to see the output generated from Simulink
The correct block name is simulink/Discrete/Discrete Transfer Fcn

3 years ago | 0

Answered
How to write two columns data in new excel, from the already available two excel files
A = [1, 2, 3, 4] B = [5; 6; 7; 8] table(A, B)

3 years ago | 0

Answered
We are trying to use ode45 to solve for function Q1, this is my code and the error that i keep getting. Can i please get some help on what to fix?
y0 = pi:3*pi 7 initial conditions dV= dv(theta); That are passed to dv VolumeDer = diff(V(theta),1); which uses the diff() ...

3 years ago | 0

Answered
How to convert a transfer function into state space representation?
num = [0 3 2]; den = [1 4 4]; G = tf(num, den); S = ss(G) S.A S.B S.C S.D [A, B, C, D] = tf2ss(num, den) At the moment ...

3 years ago | 0

Answered
Plotting a function with three regions
See https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html for information on how to use Logical ...

3 years ago | 0

Answered
Using fmincon for objective function with symbolic variable.
fmincon does not care *how* you do the computation, but the value you return from the function must be a finite scalar real valu...

3 years ago | 0

Answered
Why do I get the error "Unbalanced or unexpected parenthesis or bracket?"
As far as I can see, Simscape uses () for indexing, not []

3 years ago | 0

Answered
App designer: UIAxis ButtonDownFcn with key modifier?
It isn't pretty... but if you set pickable parts false on your graphic objects but leave it true on your figure, then you can us...

3 years ago | 1

Answered
intersection between a many plots and a line
There is no built-in facility to take the intersection between yline or xline, with anything. You are looking for the places wh...

3 years ago | 0

Answered
How to Call a Function inside of a function
switch app.FlowrateDropDown.value Notice you used lower-case V in value . The property names are case-sensitive, so you...

3 years ago | 1

Answered
How to solve this error in Matlab
Sorry, no, we are unable to solve that based on the information provided. See https://www.mathworks.com/matlabcentral/answers/1...

3 years ago | 0

Answered
Solving matlab error message
Sorry, no, we are unable to solve that based on the information provided. See https://www.mathworks.com/matlabcentral/answers/1...

3 years ago | 0

Answered
I wanna write same program by using switch , but how ?
x = input("inter your age :"); switch(true) case x>=13 && x<18 disp("person is teenager") disp("not el...

3 years ago | 1

| accepted

Answered
Undefined function or Variable error
x = a:h:b; However, any current version of MATLAB may have problems with you replacing the function handle f with the result of...

3 years ago | 0

Answered
ocr not recognizing some numbers
You can use trainOCR to train on sample images, and pass the trained model to ocr You might want to use ocrTrainingData to help...

3 years ago | 1

| accepted

Answered
surface area of 3D surface
If you turn the above into sentences instead of bullet points, and you add an opening sentence that asks the user to solve the f...

3 years ago | 0

Answered
Operator '*' is not supported for operands of type 'matlab.ui.control.NumericEditField'.
value=app.CurrentEditField; All of your lines like that are wrong. app.CurrentEditField is the graphic object that describe...

3 years ago | 0

| accepted

Answered
loop error with "unique" and "interp1"
cgft(nsub, :) is all the same value so the second output of unique is only a single entry

3 years ago | 0

Answered
use function shortestpath,Limit the number of nodes(<=5)
There is no direct way to limit shortestpath . If you use the second output of shortestpath you can directly see what the lengt...

3 years ago | 0

Answered
I'm receiving this error code Line: 112 Column: 5 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To co
end % end of classdef block Methods must be defined inside the classdef block. You have several similar issues, of method bloc...

3 years ago | 0

Answered
vpasolve(...) and solve(...) debugging (symbolic solving for the real roots of a 4th order polynomial function.)
clear clc syms tab2 Ti = (298:25:873); %low temperature coefficients A_CO2l = [2.35677352e+00 8.98459677e-03 -7.1...

3 years ago | 0

| accepted

Answered
Unique an Array based on one of the columns
https://www.mathworks.com/matlabcentral/answers/370231-finding-unique-values-in-a-table-without-losing-the-rest-of-the-data#answ...

3 years ago | 1

| accepted

Answered
Functions of I, for i=1, n, n-1
dT = @(i) (a/r) * ((T(i+1) - T(i-1))/2*dr) + r*((T(i+1) - T(i) + T(i-1)) / dr^2) + q/cp*rho; dT(2:n-2) Caution, dT(1)...

3 years ago | 0

| accepted

Answered
How to do summation and integration?
fun = matlabFunction(q,'Vars',[ph,phi,r,z]); z=linspace(0.01,10); That is within a loop. The first time sym z is in effect but...

3 years ago | 0

Answered
collect like terms, and substitute values for i
You do not say clearly what you do want. % Clear the workspace and the command window clear; clc; % Declare the symbolic va...

3 years ago | 0

| accepted

Answered
How to increase the "linewidth" of given graphs?
clear;clc; s=tf('s'); G=(61.73*s^2+2.112e4)/(s^4+52.42*s^3+967.1*s^2+1.793e4*s); %%%%%%%%%%%%%% % Contrioller %%%%%%%%%%%%%...

3 years ago | 0

| accepted

Answered
Is online documentation (2023) a terrible idea?
Is it a terrible idea? NO. It works well for many people. The fraction of people who ask about installing MATLAB for offline us...

3 years ago | 2

Answered
How to suppress the "1" from x-axis?
xticks([])

3 years ago | 0

| accepted

Answered
How do I pass inputs into external functions from ode45?
Parameterized version -- no globals. Note: I had to guess what V*w meant. p.gamma = 1.4; p.r = 8.4; p.thetas = (3*pi)/2; p....

3 years ago | 0

| accepted

Answered
sparse matrix entries are not displayed correctly
Notice that the matrix is displayed out of order -- the normal order is linear indexing, so (1,4) would have appeared before (2,...

3 years ago | 3

| accepted

Load more