답변 있음
how to find a float number
[is_there, idx] = ismembertol(-0.3340, y7) %options allow you to control tolerances y7(idx) Also, [~, idx] = min(abs(y7(:) -...

2일 전 | 1

답변 있음
Solve a system of linear ODEs, and plot them
You built R as a column vector but your vector of constants 10^-7 and so on is a row vector. You will accidentally creating conf...

2일 전 | 1

답변 있음
Could someone please tell me why this code is printing(Dam level too low) for almost every output.
Newvol(k+1)=Newvol(k)+(Qin(k)-Qout); Newvol is a vector. if Newvol>=p100; You are testing the entire vector in that statemen...

2일 전 | 0

답변 있음
How to Plot a function that contains summation?
alpha = 8; m = (1:alpha).'; f = @(x) 2/pi + sum(2 .* ((-1).^m - 1)./(pi .* m.^2) .* cos( m.*x ), 1); fplot(f, [-pi pi])

2일 전 | 1

| 수락됨

답변 있음
graph won't plot in correct spot
If you do not want negative values shown, then clip them out of the plot by adjusting xlim and ylim. % plot mountain Mn_x = [0...

2일 전 | 0

답변 있음
how to assign imagesc to figure 1
fig1 = figure(1); ax1 = axes('Parent', fig1); imagesc(A1, 'Parent', ax1); If there is an existing axes you want to draw int...

2일 전 | 0

| 수락됨

답변 있음
Support for other Raspberry Pi operating systems.
Are there any plans to support other - non Raspberry Pi fundation based - operating systems / distros? No. There are too many L...

2일 전 | 0

답변 있음
I am finding it difficult to write extended langmuir isotherm using summation.
The meaning of that is not clear. The expression contains both and using exactly the same symbol . That tells us that the non...

2일 전 | 0

답변 있음
Please someone help me correct my code. I want to plot a 2D graph for distinct alpha in one single 2D plot. See the attached photo for the guidience
alpha=[0.7, 0.8,0.9,1]; P=1; t=0.5; s = (-5:0.2:5).'; A=(1-s.^2)+((P-4).*(t.^alpha))./(gamma(alpha+1)); plot(s,A); xlabel(...

2일 전 | 0

| 수락됨

답변 있음
Curve fitting with integral involved
format long g T = [120,210,400,540,650]; B = [-344,-157,-17.5,-0.85,10.5]; syms t y syms constant [1 2] expr = ((2.*pi.*(...

2일 전 | 0

| 수락됨

답변 있음
How I can modify this code to read files in a folder into tables?
nfiles = length(theFiles); results = cell(nfiles,2); fullnames = fullfile({theFiles.folder}, {theFiles.name}); results(:,1) =...

3일 전 | 1

| 수락됨

답변 있음
Displaying a set of images from a folder
projectdir = 'path/to/image/directory'; ext = '.png'; %adjust according to kind of images dinfo = dir( fullfile( projectdir, ...

3일 전 | 0

| 수락됨

답변 있음
Index in position 1 exceeds array bounds (must not exceed 1). Error in pij (line 14) pmat(k,n) = pis(k,1) .* tau(k,n); Error in pfij (line 18)
Consolidated code, as you are having difficulty understanding me: I do not recommend running this with maximum function evaluat...

3일 전 | 0

| 수락됨

답변 있음
What should go in a next-generation MATLAB X?
This would not break backwards compatibility, but something to consider: A lot of time, people try to for x = first:increment...

3일 전 | 0

답변 있음
External function problem.
in MATLAB, assigning to one of the input parameters only causes local changes, not change to variable passed in. To change the v...

4일 전 | 0

| 수락됨

답변 있음
Write a matlab code to generate a 1 X N matrix with values in the range of 1-100 according to a normal distribution with mean= 0 and variance=1
You can create a normal distribution and then truncate it. The truncated distribution still has total probability 1, which is ha...

4일 전 | 0

답변 있음
Printing of 1000 matrix .
Note that in the below, Row1, Row2, and so on are only for display purposes. The code does not create matrices by those names. ...

4일 전 | 0

답변 있음
Error: "Difference order N must be a positive integer scalar"
There are two different functions named diff(). Symbolic diff is calculus differentiation. It needs a symbolic expression (sym...

4일 전 | 1

답변 있음
Error "Undefined function or variable"
Perhaps num_of_samples is less than 1. Perhaps data_files(data_counter).Video is empty for all num_of_samples different videos....

4일 전 | 0

| 수락됨

답변 있음
What should go in a next-generation MATLAB X?
Currently the model of MATLAB is that it always evaluates from left to right [*] finding the left-most unprocessed sub-expressio...

5일 전 | 1

답변 있음
Event function for ODE solver with binary values
It is not illegal, but it makes it more difficult to find the boundary. In the case of x < something resulting in a 0 that is t...

5일 전 | 0

답변 있음
Only graphing two out of three of my graphs
N = 1200; %arbitrary deltast = 2e-5; t1 = 0:deltast:deltast*(N-1); xlow=0.02394; zeropos=find(t1==xlow) Empty. No ex...

5일 전 | 0

답변 있음
find the values of a variable for which the determinant of the matrix become zero?
syms w real a = 2e-3; X = 150-3; h = 20e-3; b = 20e-3; A = b*h; l = 500e-3; I = (b*(h^3))/12; p = 2700; E= 69e9; v12 =...

6일 전 | 0

| 수락됨

답변 있음
Removing one length from a matrix
C = A .* reshape(B, size(A,1), size(A,2), size(A,3), []); This assumes element-by-element multiplication, not matrix multiplica...

6일 전 | 0

| 수락됨

답변 있음
code is giving error ,unable to get output graphs...
This is closer. I had to speculate about what the validation was intended to do, and about what proper coordinates were. There...

6일 전 | 0

답변 있음
I have a Matrix , and I want to multiply this Matrix with something so I can get zeros
null(P1) Note: this may have different number of columns depending on the values in P1. Each column of the result will be inde...

6일 전 | 0

| 수락됨

답변 있음
Matlab warning when using log
axis([0 7*10^5 0 4.77./5]) set(gca,'YScale','log','XScale','log') %this is the reason for all of it. Do not use an axis lim...

6일 전 | 1

| 수락됨

답변 있음
Function readtable: how to insert the value of a variable double in the directory
basedir = fullfile('C:\Users', 'hp', 'OneDrive', 'Project', 'Results'); x = 'rig53'; y = 97; filename = fullfile(basedir, x, ...

6일 전 | 0

답변 있음
No constructor 'Stateflow.Annotation' with matching signature found
I confirm that the statement does not work in R2017b, which is the first release that has a documentation page for it. The R201...

6일 전 | 0

답변 있음
operations on two different matrices
D0 j=1,8 A(1, j)=D(2,j+1) end do Acol = size(A,2); A(1,:) = D(2,2:Acol+1); vec = DD1(1,:); A1(idx,:) = repmat(vec,numel(id...

6일 전 | 0

| 수락됨

더로드