Respondida
MATLAB does not print vector file even with renderer specified
how about image format ? print('-image','a1.eps','-depsc')

casi 3 años hace | 0

Respondida
Adding zeros to a column vector to match a larger column vector
x = rand(100,1) % column vector y = rand(108,1) % another column vector of different size zeros(1,length(y)-length(x)) % row ...

casi 3 años hace | 0

Respondida
Numerical Differentiation using Finite Differences
h = 0.01; X = 0:h:2*pi; fx = sin(X); df1 = (sin(X+h) - sin(X))/h; df2 = (sin(X) - sin(X-h))/h; df3 = (sin(X+h) - sin(...

casi 3 años hace | 1

Respondida
why I get the error message like "Attempt to execute SCRIPT bar as a function"?
power_input = [-load -p_c] % this line uses builtin function load

casi 3 años hace | 0

Respondida
Inputting a Matrix into a function
t0 = 0.5235; t1d = 0:60; t1r = deg2rad(t1d);% use this function to convert to radians phi = pi; g = cos(t0)*cos(t1r) + sin(t...

casi 3 años hace | 0

Respondida
Symbolic toolbox differentiation by chain rule without expression defined
syms x(t) y(t) z(x,y) t x = x(t); y = y(t); z = z(x,y) C = diff(z,t)

casi 3 años hace | 0

| aceptada

Respondida
How to count number of terms in a symbolic expression?
syms x y z='x*y+cos(x*y)*x+x*sin(x)+sin(x)*cos(x)-x-y+2' C = strsplit(z,{'+','-'}) length(C) C{3} % 3rd term

casi 3 años hace | 0

Respondida
What command do i need after de hold off fuction to print the labels in my plot?
print('-image','-dpng', 'windclimate_allyears.png') Try using the OpenGL graphics rendering format as above. The version of Mat...

casi 3 años hace | 0

Respondida
How do I optimize graph size?
May be the change in coefficient for cosine function plotted in black color as shown below z = -72:0.2:72; hold on Tb = 543.4...

casi 3 años hace | 1

| aceptada

Respondida
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);...

casi 3 años hace | 1

Respondida
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...

casi 3 años hace | 1

Respondida
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...

casi 3 años hace | 0

| aceptada

Respondida
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...

casi 3 años hace | 1

Respondida
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...

alrededor de 3 años hace | 0

Respondida
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, ...

alrededor de 3 años hace | 1

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

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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 % ...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

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

más de 3 años hace | 0

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

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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,...

más de 3 años hace | 1

| aceptada

Respondida
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...

más de 3 años hace | 0

Respondida
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(...

más de 3 años hace | 0

Respondida
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{...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

Respondida
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(:)

más de 3 años hace | 1

| aceptada

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

Cargar más