回答済み
I am trying to plot a series, with multiple variables.
clc; % Define parameters T_sub_1 = 100; H = 2; L=1; syms n % Create meshgrid x=linspace(0,2,20); y=linspace(0,4,20);...

2年以上 前 | 1

回答済み
Matlab symbolic : calculate expression with vector of symbolic variables
Use the element wise operator for / and ^ ... i.e. ./ and .^ as below clear syms l_min l_max fsky Np var1D var2D varO1...

2年以上 前 | 1

回答済み
while loop running forever during attempt at Newton Rhapson method
d=0.007; dI=1.219; Rfi=1.76*(10^(-4)); Rf0=Rfi; hs=356; ht=hs; kw=60; dTm=29.6; Q=801368; Aex=64.15; a=((1/ht)+Rfi)/dI...

2年以上 前 | 0

| 採用済み

回答済み
Need to solve Fourier Series script
if you have the entire code in one script file, then you can put all the functions after the plot function call as below otherwi...

2年以上 前 | 1

回答済み
Correlation Coefficient in Legend
Use the sprintf command in legend function just like the text, and include a higher precision specifier for decimals e.g,. 5...

2年以上 前 | 0

回答済み
can't plot
syms p1 ap2 ap3 ap4 th1 = 0; ap1 = 0; a1 = 0; b1 = 0.5; c1 = 0; R1z = [ cos(p1), -sin(p1),0, 0; sin(p1), cos(p1), 0, ...

2年以上 前 | 1

回答済み
why is this code not running?
plot(TimeValue, Pdispatch(:, 1), 'Color','r', 'LineWidth', 2);

2年以上 前 | 0

回答済み
Error: variable might be used before it is defined.
Change this line yy2 = Pr*(y(4)*y(2)-y(1)*y(5)-Df*yy3-Nb*y(5)*y(7)-Nt*y(5)^2) to yy2 = Pr*(y(4)*y(2)-y(1)*y(5)-Df*y(3)-Nb*y...

2年以上 前 | 0

回答済み
Why am I getting the error "Array indices must be positive integers or logical values" in MATPOWER?
The problem is with nested matrices bs or n2i matrices. % brs = ( mpc.branch(:, BR_STATUS) & ... %% branch status % ...

2年以上 前 | 0

回答済み
Conversion of symbolic expression to double without obtaining complex numbers
oneway, is to use a conditional statement for negative input values through abs function. But if you want to avoid complex va...

2年以上 前 | 0

回答済み
argument suggestion with shared argument validator
function s = fun3(a) arguments a {mustBeMember(a,@dummyClass)} = "a" end ...

2年以上 前 | 0

回答済み
Matlab App designer export figure
% File exchange exportfig(app.UIAxes,"test") % Standard matlab function savefig(app.UIAxes,"test.fig") % exportgraphics ...

2年以上 前 | 0

回答済み
f(x)=3x^3-5x^2+3x-7=0
x(1) = 0; % assuming x(1) = 0 kk(1)=1; for k=1:100; fx=3*x(k)^3-5*x(k)^2+3*x(k)-7; % use multplication operator for pro...

2年以上 前 | 0

回答済み
How can I fix this error?
shipweightpmf( [2 2.5 6] )' function y = shipweightpmf(x) s = (1:8)'; p = [0.15*ones(4,1); 0.1*ones(4,1)]; y = finitepmf(s,...

2年以上 前 | 1

| 採用済み

回答済み
How to disable a block in library ?
You can either use *switch-case* statements for controlling the execution of service meter blocks or a *function call* to trigge...

2年以上 前 | 0

回答済み
Add values from vector to plot title
title({['Unit Step Response of G(s) = \omega_{n}/(s^2 + 2\zeta\omega_{n}s + \omega_{n}^2)'], ... ['\zeta = ', num2str(...

2年以上 前 | 0

回答済み
how to create stack with multiple images?
b=cell(7,9); I_max=cell(7,9); I_stack_store=cell(9,1); for t=1:9 for i=1:7 I= rand(50,10,3); b{...

2年以上 前 | 0

| 採用済み

回答済み
How to plot simulation results in a GUI while the simulation is running?
Use drawnow command for updating the simulation results Read more about the command here https://in.mathworks.com/help/matl...

2年以上 前 | 0

回答済み
save images in array in two for loops
b=cell(7,9); for t=1:9 for i=1:7 I= rand(34,78,2); % image data b{i,t}=I; end end b = b(:)

2年以上 前 | 1

| 採用済み

回答済み
Getting the Wrong Output While Using Image Batch Processor
possibly you are calliing the function porosity_function inside a loop, which repeats 12 times and storing the output for all im...

2年以上 前 | 0

回答済み
a function just valid over a certain range
x = 0:0.1:10 ; for k = 1:length(x) if x(k) >= 2 & x(k)<= 8 y(k) = x(k).^2+3.*x(k)+1 ; else y(k...

2年以上 前 | 0

| 採用済み

回答済み
error in multiplying symbolic variable in a matrix
clear clc syms z L [1 11] z , L x=[0 300 1000 1500 1700 2000 3000 3300 4000 4500 5000]; y=[32.0 122.4 296.4 405.7 447.6 60...

2年以上 前 | 0

回答済み
How to write the output of matlab iteration results of many equations in excel in row by row specifying the starting row?
k = 1; for Xref1=0:0.1:1 % Loop through the range of inputs Xref1; Hi=Xref1*10; Lo=Xref1*5; out_put(k,:...

2年以上 前 | 0

| 採用済み

回答済み
Stateflow onramp unreachable state task 4 error
Did you give the conditions & condition actions also from previous tasks ? It looks like you've added only transition

2年以上 前 | 0

回答済み
plot w=exp(-x/0.3042) (when 0<w<1)
w=@(x) exp(-x/0.3042) fplot(w,[0 1])

2年以上 前 | 1

回答済み
simple function plot in MATLAB
Hi @Sanjida Use element wise division for evaluatiing the vector Y, It seems you have used incorrect operator ' \ ' this is...

2年以上 前 | 1

回答済み
Properties of exponentials - symbolic algebra
Hi @Luca Lazzizzera You can of course use simplify as @Mischa Kim mentioned. However, if you want to obtain the simplified ex...

2年以上 前 | 0

回答済み
How to design a robust PI controller based on the Sensitivity peak value
Define or write these lines of code before the symbolic equation M_eqn. This equation contains two undefined variables, alpha a...

2年以上 前 | 1

回答済み
How to convert a symbolic matrix into matrix polynomial
syms x N = [1 5-3*x 0;0 1 5-3*x;1 0 x^2-5] K = poly2sym(N,[x]) simplify(K)

2年以上 前 | 0

回答済み
Scatter plot does not display multiplied values
If I add multiplication by a constant, the vectors are scattered well with the new values, but the numbers are not This is some...

2年以上 前 | 1

さらに読み込む