Answered
I don't know how to write the following problem: f(x)=2x^3-15.4x^2+2.7x+2.25 - Determine the area under f(x) on the interval [-1,8]. Use the zeros rounded to one decimal
This can all be done symbolically easily enough xrange = [-1 8]; syms x f = 2*x^3 - 15.4*x^2 + 2.7*x + 2.25; area = int(f,x,...

6 days ago | 1

Answered
HOW TO PUT ONE MATRIX UNDER ANOTHER AND MAKE IT A SINGLE MATRIX
A = [1 2 3;4 5 6;7 8 9] B = [1 2 2;2 2 2;1 1 1] % concatenate C = [A; B] % or C = cat(1,A,B)

6 days ago | 0

| accepted

Answered
I want column matrix in for loop
I'm not sure, but this might be close to what you want. n=10 xrange = 11:13; yrange = 11:13; for k = 1:(n-1) image1...

6 days ago | 1

Answered
for loop which changes color depending on the month
I don't have your data, so I just have to assume some placeholder data instead. It's probably better to use a legend for identi...

7 days ago | 0

Answered
croping of an image without imcrop
Don't save displayed images; save the image itself. imwrite(I2,'E:\UB\MATLAB\X\1.png'); Saving a displayed image is tantamou...

7 days ago | 1

| accepted

Answered
How to use mean2 and skip some rows?
What's wrong with just mymean = mean(yearly_data_matrix(5:end,11)); since you're extracting a vector, I don't see the need for...

7 days ago | 0

| accepted

Answered
While loop not working
Your if statements don't do anything when they test true. That should all be one if-elseif structure because the cases are all ...

7 days ago | 0

Answered
Single value in colors vector causes error in scatter plot
The code you give works fine in the newest version that I have (R2019b), but not in R2021b. I'm not exactly sure what changed, ...

7 days ago | 1

| accepted

Answered
Colormap always shades of blue
You're not specifying your colormap length. If you don't do that, colormap() will create a map equal to the length of the curre...

8 days ago | 0

| accepted

Answered
what does format short in a matlab code do??
It just changes the display format used when numbers are printed to console. format long pi format short pi There are othe...

8 days ago | 0

| accepted

Answered
trying to store figures in an array, in a loop, instead of printing each figure
Since you're just using the gray colormap, there really isn't much that needs to be done. You can use mat2gray() to normalize t...

8 days ago | 2

Answered
while loop not working
This isn't exactly an elegant solution, but if we're gathering a bunch of parameters using input(), I think we've already crosse...

8 days ago | 0

Answered
Select only determined rows in a matrix
Something like this. You'll have to adjust the starting index as needed: A = repmat((1:100).',[1 4]) % smaller example (100x4)...

9 days ago | 0

Answered
Is it possible to use the colormap "Purples" in MATLAB, which maps zeros to white?
The answer is yes, but that's not really helpful. The real question is how do you get the colormap from matplotlib into MATLAB?...

9 days ago | 0

Answered
How to plot a matrix in a checkerboard style
Something like this should be a start: Im = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 1 0 0 ...

9 days ago | 2

| accepted

Answered
what does this mean in matlab code????
The expression ((floor(mr/2)==ceil(mr/2)) | (floor(mc/2)==ceil(mc/2))) conceptually says ((number of rows is even) OR (number...

9 days ago | 0

| accepted

Answered
only masking part of image help
There's at least one thing going on here. This operation frame(755:933,206:388)<threshold will return a 179x183 logical image...

9 days ago | 1

| accepted

Answered
How to plot a different symbol and symbol line for each plot inside this loop?
I'm not sure why you're using a loop to create the same plots three times with different symbols. Are there other columns (of a...

9 days ago | 0

| accepted

Answered
how to change colors of lines in a plot to exist on a scale
What exactly do you mean by "on a scale"? If what you're looking for is a means to have the line colors share a continuous colo...

9 days ago | 0

Answered
Create rapid beeping tone in matlab
Depends how you want to do it. I bet there's lots of ways. I just made a piecewise signal and played it. fs = 8192; toned...

9 days ago | 0

Answered
Undefined components in YCbCr color space
I know this is dead, but I'm bored on a slow Saturday. No, not in the same way. YCbCr is just a simple linear transformation o...

9 days ago | 0

| accepted

Answered
How to find a value in a matrix
Consider the simple example: % two orthogonal grids [x y] = meshgrid(linspace(0,1,10)) % the point you're trying to locate t...

9 days ago | 0

| accepted

Answered
Integration with arbitrary constant
It depends if you want to do this numerically or symbolically % symbolically syms x a f = x-a; int(f,0,1) % answer is a func...

10 days ago | 0

| accepted

Answered
loop over all values in V
If this is the expression you're using % f is of the form A/I2 f = @(I2,V) (I_p - I_o*(exp((V+R_s*I2)./V_t)-1) - V + R_s*I2/R_...

10 days ago | 0

Answered
multiscale retinex
This FEX submission is probably of interest: https://www.mathworks.com/matlabcentral/fileexchange/71386-multiscale-retinex Thi...

10 days ago | 0

Answered
Convert RGB to HSI
Yes, it makes a difference. Compare the results for HSI, HSL and HSV: R = [ 120 20 30; 170 20 70; 120 140 70 ]; G =...

10 days ago | 0

| accepted

Answered
Save mean values in additional column
Something like this % dummy data N = 15; Range1peaks = [10*rand(N,1)-70 2*rand(N,1)+4 randi([0 5],N,1)] % sort [~,Peaks_ind...

10 days ago | 0

Answered
Images stored in a cell array are getting cut off
Whatever your processImage function is returning, it's not 1024x1344 raster data. I doubt it's getting cut off either. It's a ...

10 days ago | 0

Answered
How to split a vector into 2 vectors, that one holds the evens and one hold the odds
Something like this will extract the contents of odd/even indices: V = 1:10; odds = V(1:2:end) evens = V(2:2:end) Note that'...

10 days ago | 1

| accepted

Answered
How can I use the solve command in Matlab to find the intersection of two equations?
Something like this: % solve system of equations syms x y eqn1 = x^2 + y^2 == 9; eqn2 = 2*x + 3*y == 4; S = solve([eqn2 e...

10 days ago | 0

Load more