已回答
Storing Value From For Loop
%f true value = 2200; for n=1:15 V(n) = value*1.04^n end

5 years 前 | 1

已回答
Code with function file not working
%if true P = X*(1+r/100).^t Change this line by adding operators

5 years 前 | 1

| 已接受

已回答
How to call two sets of arrays in a nested loop?
%if true a=45; x1=1:.02:6; alpha=x1.^4; t = 0:(pi/360):2*pi; %rray=zeros(251,721); p = 0:(pi/360):2*pi; K = 1:0.02:...

5 years 前 | 0

| 已接受

已回答
Matrix construction over a loop
clear x=[1:1:10]; a=2; b=4; c=6; for i=1:length(x) A(i)=a*b/x(i); B(i)=c+A(i)/b; D=a+b; E=1-2*c; MAT(i,:)=[B(i);D;E]; ...

5 years 前 | 1

| 已接受

已回答
Index exceeds the number of array elements (1).
do=sqrt(Efs/Emp); %distance between cluster head and base station for i=1:1:n %do(i)=sqrt(Efs/Emp); %distance betw...

5 years 前 | 0

| 已接受

已回答
Warning: Error updating FunctionSurface. The following error was reported evaluating the function in FunctionLine update: Unable to convert expression into double array.
%f true Ta = symsum(80*((1-(-1).^n)./(n*pi)).*sinh(n*pi*(0.4-y)./0.3).*sin(n*pi*x/0.3)./sinh(n*pi*0.4/0.3),n,1,Inf); Tb ...

5 years 前 | 0

| 已接受

已回答
Solving is taking infinite time
%if true for x=1:numel(X) double(X(x)) end

5 years 前 | 0

| 已接受

已回答
Issue with solving an equation
%if (3500*sqrt(x/30))./(1.4*sqrt(x/30)+0.115*x-276) Missing element wise operator

5 years 前 | 0

| 已接受

已回答
Different line types for multiple curves
%f true figure; p = plot(x, y); set(p, {'LineStyle'},{'-';'--';'-';'--'},{'color'}, {'r'; 'r'; 'b'; 'b'});

5 years 前 | 2

已回答
How can I give main title for multi-graphs?
%if true sgtitle('your title')

5 years 前 | 1

| 已接受

已回答
How can I give main title to the multi graph
%if true sgtitle('your title name')

5 years 前 | 0

| 已接受

已回答
Plotting within a nested for loop
%if true fig4 = figure() Comment the above line in the loop. It produces a seperate figure window each time in loop

5 years 前 | 1

| 已接受

已回答
Vectors Must be same length. Do I use Linspace or ?
%if true t = linspace(0,6,length(s));%0:0.05:6; What is size of variable _s_ in workspace ?

5 years 前 | 0

| 已接受

已回答
Square Wave from Sine Waves
%f true f = 0.5; vp = 2; N = 8; t = 0:0.01:2; for k = 1: length(t) for i = 1:N K(i,k) = (1/(2*i-1))*(vp*sin(2*pi*(2*i-1...

5 years 前 | 0

| 已接受

已回答
Display elapsed time on the x-axis
%if true tic; for i = 1:1000 disp('Running your program ') ; pause(20); end toc plot(1:round(toc),linspace(1,10,roun...

5 years 前 | 1

| 已接受

已回答
Issues plotting an equation.
%f true clc t=0:.5:5; w_d=4; o=1 x=(10*exp(-o*t).*(cos(w_d*t))-(0.2*exp(-o*t)).*(sin(w_d*t))); plot(x,t) Try abov...

5 years 前 | 1

| 已接受

已回答
Error: get_steady_state>@(x)equilibrium(x,Wl,Pin,T0) (第 41 行) 输入参数太多。Error Code Location : [a_steady, ~, exitflag, ~] = fsolve(@(x) equilibrium(x, Wl, Pin, T0), [real(a_steady)*1e16 imag(a_steady)*1e16], opt);
%f true fsolve(@equilibrium,...) Without @(x) inside the _fsolve_ function.call the function name as above with only the ...

5 years 前 | 0

| 已接受

已回答
I've been stuck for way too long on this problem, I really just need someone to help me with the syntax I need for this problem.
%if true for b = 1: x if a(b) == 5 % do some thing here end end

5 years 前 | 0

| 已接受

已回答
I am getting "Error in Plots (line 31)" but ı don't understand why
%if true figure plot(alpha,Fy(:,1),alpha,Fy(:,2),alpha,Fy(:,3),alpha,Fy(:,4),'linewidth',2) You forgot to close the pare...

5 years 前 | 0

| 已接受

已回答
Unrecognized function or variable 'writevideo'.
%if true writeVideo(vv,A)

5 years 前 | 0

| 已接受

已回答
Pick one value from multiple results
X1(1)

5 years 前 | 1

| 已接受

已回答
Fitting using pop up menu on matlab gui
%if file=uigetfile('*.xlsx') set(handles.edit1,'String', file) data = xlsread(file) Try above

5 years 前 | 0

| 已接受

已回答
Reducing the points on x -axis
%if clc; g=0.43; z=-0.001:0.01:2.322; k=0.272; f=g*z+k; plot(log(z),f-0.272);xlim([-4 4]) Try this

5 years 前 | 0

| 已接受

已回答
not getting a plot
%f plot(U_by_P,R,'r') Try above. You might want plot of R and U_by_P

5 years 前 | 1

已回答
simplification and preallocation of a symbolic value in matlab script
%if true vpa(BLOKS,4) Try something like above using _vpa_

5 years 前 | 1

| 已接受

已回答
Retrieve vector within function file
function [dot,u] = fun(~,x) k = 1; p = 10; %x = x(1); x u = (-k.*x + x.^3 - p.*x.^2) ./ x; xdot = -x.^3 + p.*x.^2 + x.*u; ...

5 years 前 | 0

| 已接受

已回答
How to change length of profile on a plot
%if true clear all Use above command at beginning of program code.

5 years 前 | 0

| 已接受

已回答
I want to see the text & strings in a single line of Xlabel
%if true xlabel(['Timeseries' num2str(timestamp(end-1)) 'to' num2str(timestamp(end))]); Use num2str

5 years 前 | 1

已回答
Plotting problem of the different size vectors
%f true f=(400:10:2000)*1e6; for k=1:length(f) S(k)=20*sin(2*pi*f(k)); z=linspace(0,1/f(k),200); for m=1:length(z); x(m...

5 years 前 | 0

| 已接受

加载更多