Answered
How to take the color grade from one image and apply it to another?
rgb2ind the base image and save the color map. Now rgb2ind the second image and ind2rgb passing in the saved colormap.

3 years ago | 1

Answered
I keep getting this error at line 15: "Unable to perform assignment because the left and right sides have a different number of elements."
f=@(t,y) (3)*exp(-x)-0.4*(y); You happen to have a variable named x in your workspace, and it is being used there. It is no...

3 years ago | 1

| accepted

Answered
Help command does not work, it has 'matlab.internal.help.helpProcess' class destructor: Error using newline
It sounds as if you have a third-party newline function, such as from a package such as pplane or spm12 . Check using which -a...

3 years ago | 0

Answered
How to create two lists one with the even and another with odd numbers on a vector
i=1 %... list_odd(i)=vetor(i) You never increase i so you are always writing to the same output location. If you did increase...

3 years ago | 0

| accepted

Answered
Broad confidence bound range when fitting in Matlab
When you see a coefficient shown with bounds that are close to the equal positive and negative, then it typically means that the...

3 years ago | 1

Answered
Password protect mat files
No, there is no easy way to do that. https://www.mathworks.com/matlabcentral/answers/43896-encryption-of-mat-files#answer_53901...

3 years ago | 0

| accepted

Answered
Splitting data into sets of 20 to store in a variable
Dates = data.Date; dayoffset = days(Dates - Dates(1)); G = floor(dayoffset/20) + 1; DataE20 = splitapply(@(Date,Open,High,L...

3 years ago | 0

| accepted

Answered
i want help to Gui fonction checkbox
Edit pushbutton2_Callback so that it fetches handles.checkbox7.Value and the other checkboxes, multiplies each Value (which will...

3 years ago | 0

Answered
How do I user error check letters except "yes" or "no"?
Use questdlg or listdlg . You get to specify the exact responses possible. The only response that the user can give that is not ...

3 years ago | 0

Answered
make figure contours mor evident
When you call contour() you can pass in the number of contour levels to use. Or instead you can pass in a vector of the values o...

3 years ago | 0

Answered
How to determine how many random numbers were generated, using Mersenne twister?
Record the two rng states. Loop generating one number at a time from each of the two streams until the newly generated state of ...

3 years ago | 0

| accepted

Answered
String Comparisons in Tables
if strcmp(ImportDataGeom(i,1),"CircleR"+i) When you use () indexing of a table, the result is a table. Use {} instead.

3 years ago | 1

| accepted

Answered
Int() returning incorrect answer
Especially in the case of trig expressions or expressions that integrate to trig (such as ones that integrate to arctan), then i...

3 years ago | 0

| accepted

Answered
Can't open simscape electrical example in command window
That example is new as of R2021b, the release after the one you have. Note: the url details changed as of r2022b; the previou...

3 years ago | 0

| accepted

Answered
error message: integral calculation
p = (abs(integral(@(z) fun,0,Ls)))^2/Le%ρ @(z)fun is an anonymous function that ignores its input argument and returns the a...

3 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
for ii=1:J+1 Sr = 7.5 + 0.001*(1+sin(X*ii)); Sl = 7.5 + 0.001*(1+sin(X*ii)); Ir = 0.0 + 0.001*(1+si...

3 years ago | 0

Answered
Which Matlab product service install for electrical engineering students?
For Electrical Engineering work, Simulink especially with Simscape Electrical are often used. Filtering signals is quite common...

3 years ago | 2

Answered
'for' loops in app designer methods have a parsing problem
It is a language limitation. for has never supported any kind of indexing for the loop control variable. The limitation saves de...

3 years ago | 1

| accepted

Answered
Hello Matlab Community, Can someone write sum loop for me as menstion in the image and how to use subscript 1 with Q..
A = rand(1,20); B = rand(1,20); X = A./B; %looped sum total_looped = 0; for Index = 1 : numel(X) total_looped = total...

3 years ago | 0

Answered
Display a cell in an fprintf?
You can use celldisp to display a cell, but the result is somewhat verbose, not a nice format. What you would normally do with ...

3 years ago | 0

Answered
how to make matrix
F = zeros(20,1); F(1:4) = 3.3; F(5:7) = 4.2; F(8:10) = 1.8; F(11:13) = 6.9; F(14:17) = 4.3; F(18:20) = 4.1; table(F) ...

3 years ago | 0

Answered
How to find the mean for each specified range in a table without writing multiple lines of the same code?
Like I told you before, use groupsummary (see also findgroups )

3 years ago | 0

Answered
Trying to use fsolve works over lower part of range (values < 10) but fails in upper part of range (values > 10)
Vbfcn = @(Ca,Cb,Ka,Kb,Kw,Va,H) Va.*((Ca./(1+H./Ka) - H + Kw./H) ./ (Cb./(1+Kw./(H*Kb)) + H - Kw./H)); In the line above, I do...

3 years ago | 1

Answered
Debugging a sequence of anonymous functions
"I have to use the anonymous functions as is. I was just wondering if there's a easy way to debug them" No, there is not. You c...

3 years ago | 0

| accepted

Answered
Can we manipulate a file without opening it
I suggest that you switch to using parfeval() . Approximately while you haven't gotten tired of it all while number of act...

3 years ago | 0

Answered
Thunderstorm Summary Matlab Solution
The figure below shows That is not a question. You can analyze this data That is not a question. You will use the groupsumma...

3 years ago | 0

Answered
How can i use any variable once for initialization and then the variable is updated and should be replaced with new value? I tried one way, but it isn't working
persistent V iter_count if isempty(V) V = [1.0000 0.9159 0.9139 0.9133 0.9965 0.9929 0.9922 0.9916 0.9794 ...

3 years ago | 0

| accepted

Answered
How to extract certain cells from one column based on the information in another column using data from imported file?
mask = Book1.Year == 2016 & Book1.Province == "QC"; subset = Book1(mask,:); See also splitapply and groupsummary

3 years ago | 0

Answered
I'm trying to plot the results of the while loop but the graph is showing gup blank, can someone show me what I'm doing wrong? Thanks!
t = 0; vv = 0; Those are scalars t = acosd(1-(((m1*vv)^2)/(2*m2^2*g*L))); vv is a scalar, and probably m1 and m2 and g ...

3 years ago | 0

Answered
How to find an array with all common elements?
a= [1 1 1 0 1]; b= [1 0 1 1 0]; a(a == b)

3 years ago | 0

| accepted

Load more