已回答
Hi COMM, How can I hold only one plot while updating the rest in a figure ? E.g. I want to keep (x,f) plot fixed , while keeping the current value for the animated plot
for k=1:length(x) plot(x(1:k),f(1:k),'or') axis([SSmin SSmax 0 30]) pause(2) end Check with this

4 years 前 | 0

已回答
How ro divide a scalar by a excel data and plot the result?
X= 51./data(:,4); Use the element wise division operator

4 years 前 | 0

| 已接受

已回答
How can ı solve invalid indexing or function
clc; clear all; syms nw W x Q(x) Y Qo ode1=diff(Q,x)== -nw*W*Y; cond1 = Q(0)== 0; cozum1(x)=dsolve(ode1,cond1); cozum1=s...

4 years 前 | 0

已回答
Need a help to design a block.
If there is no standard block for flow rate in (Smmulink or Simscape)library, then you can define 2 variables as signals. One fo...

4 years 前 | 0

| 已接受

已回答
Matlab code - can anyone guide me how to sort this kind of error, I am new to MATLAB and trying to create an interface for a audio listening experiment
function varargout = TEST(varargin) % TEST MATLAB code for TEST.fig % TEST, by itself, creates a new TEST or raises the e...

4 years 前 | 0

| 已接受

已回答
How to plot subset of X-axis names on bar plot?
plotNamesD = plotNames(1:kId);% use the for loop index plotDataD = plotData(1:kId); bar(plotNamesD,plotDataD); hold ...

4 years 前 | 0

| 已接受

已回答
reading and interpreting statistical chart
<https://in.mathworks.com/help/matlab/ref/pie.html> Check this link

4 years 前 | 0

| 已接受

已回答
Plotting a Piecewise Function
syms x z(x) y=piecewise(x<0,0, x>0,1); z(x)=(1+(x-1).*exp(-x)).*y; fplot(z,[-3 3]) Best wishes

4 years 前 | 0

| 已接受

已回答
data is getting plot on 4 different graphs while I would like to see all the data on one graph!
figure(1) If you use loop index for figure, then it will plot as many figures as number of files

4 years 前 | 0

| 已接受

已回答
Incrementing a loop for the next set of values
poweredbypv=(zeros(size(8760,24))); for j = 1: length(poweredbypv) for i=1:24 if Egenpv(i) > Eelectrolyzer poweredbypv(j,i...

4 years 前 | 0

| 已接受

已回答
How can I plot f(x,y)= x(1-x)*y in matlab
f = @(x,y) x.*(1-x).*y; Y = f(linspace(0,1,50),linspace(0,10,50)); plot(Y) You can use this as another way to plot your funct...

4 years 前 | 0

已回答
Plotting a Continuous Spectrum
Try changing the values for T ,time period from 0.2 to 1. You can notice the difference whether it's continuous or appears as di...

4 years 前 | 1

| 已接受

已回答
Trapezoidal numerical integration without use of function?
a=0; b=1; f=@(x)x.*sin(x); n=100; x=linspace(a,b,n+1); h=(b-a)/n; qt=sum(h*(f(x(1:n))+f(x(2:n+1)))/2) You did not use the...

4 years 前 | 0

已回答
why is the c of scatter function scaled automatically?
figure() yyaxis left x = linspace(0,3*pi,200); y = cos(x) + rand(1,200); c = linspace(1,10,length(x)); scatter(x,y,[],c) c...

4 years 前 | 0

已回答
Convolute ramp signal and step signal
x = 1:1:10 ; p = linspace(0.1,1,length(x)); u = ones(1 , length(x)); r = p.*u; y = conv(r,u,'same'); plot(x,y); Try us...

4 years 前 | 1

| 已接受

已回答
hello i want to create a table by using the value i obtained from a for loop, how can i get it
x=5 y=30 I = 1 for z=[1 2 4 8] a(I)=x*y*z; xx(I) = x;yy(I) = y; I = I+1; end iwant = table(xx.',yy.',a.','VariableName...

4 years 前 | 0

| 已接受

已回答
How to arrange with the graph
clc; clear; K_t=750; K_r=250; b=5; f_z=0.1; theta=0:360 ; for i = 1: length(theta) if (theta(i) >= 60 & theta(i...

4 years 前 | 0

| 已接受

已回答
I can't find the error in this code. Please help with the dimension. Error in line 42
clc clear all close all %% Initial and Boundary conditions %% g = 9.81; J = 1.2./1000; h = 0.075; lambda = 0.075; u_st...

4 years 前 | 0

| 已接受

已回答
For loop in for loop
k11=28.21; k21=-4.23; k12=-18.133; k22=2.59; k13=20.815; k23=-2.97; t=0:0.1:3; num_t=length(t); t4=0; t3=-0.3588; t2=...

4 years 前 | 0

| 已接受

已回答
Operator '+' is not supported for operands of type struct
glucose1_5.date = [glucose1_5.date glucose1_5.time]; Try using the above when adding two different formats

4 years 前 | 0

| 已接受

已回答
pmake engineering stress and strain diagram
F=[0;13345;26689;40479;42703;43592;44482;44927;45372;46276;47908;49035;50265;53213;56161]; L=[25;25.037;25.073;25.113;25.122;25...

4 years 前 | 0

已回答
Error using vertcat Dimensions of arrays being concatenated are not consistent.
matrix1 = rand(1,3)%input("matrix 1 is \n"); This is example of 1 x3 matrix matrix2 = rand(3,3)%input("matrix 2 is \n")...

4 years 前 | 0

已回答
Index exceeds matrix dimensions
n = 10; Lx = 1; dx = Lx/(n-1); x = 0:dx:Lx; % 2. Parameters for the t vector m = 80; tf = 0.8; dt = tf/(m-1); t = 0:dt:...

4 years 前 | 0

已回答
Returning several dataset using ode45
for i = 1:length(r) [t,theta] = ode45(@(t,theta) odefcn(t,theta,f,r,zeta), tspan,Theta0); plot(theta(:,1),theta(:,2));hol...

4 years 前 | 0

| 已接受

已回答
Storing regression coefficients in a loop
slopes(i,j) = slope; pvals(i,j) = pval;

4 years 前 | 0

| 已接受

已回答
range in fplot as variables
clear clf clc syms x y f=x*y*(x+y); ylim=[x^2 x] ylow=ylim(1); yup=ylim(2); sol=solve(ylim(1)==ylim(2),x) a=sol(1); b=...

4 years 前 | 0

| 已接受

已回答
Integration of a function
syms x f = 3*x-x^2 ; F = int(f,x); expand(F)

4 years 前 | 0

已回答
GUI Interpolation calculator, Indices exceeds array?
clear i j n guidata(hObject,handles) clear the loop counter variables used inside the callback function every time the GU...

4 years 前 | 0

| 已接受

已回答
xlim is not working
xlim([0 20.5]) % difference Difference in using and = between the xlim and parenthesis

4 years 前 | 0

| 已接受

已回答
if-else function statement problem
function abc(day) if day=='monday' % Do a comparison disp('1'); elseif day=='saturday' % Do a comparison disp('2...

4 years 前 | 0

| 已接受

加载更多