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,...

5 dagen ago | 1

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)

5 dagen ago | 0

| accepted

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...

5 dagen ago | 1

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...

5 dagen ago | 0

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...

6 dagen ago | 1

| accepted

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...

6 dagen ago | 0

| accepted

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 ...

6 dagen ago | 0

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, ...

6 dagen ago | 1

| accepted

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...

6 dagen ago | 0

| accepted

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...

6 dagen ago | 0

| accepted

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...

7 dagen ago | 2

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...

7 dagen ago | 0

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)...

7 dagen ago | 0

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?...

8 dagen ago | 0

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 ...

8 dagen ago | 2

| accepted

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...

8 dagen ago | 0

| accepted

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...

8 dagen ago | 1

| accepted

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...

8 dagen ago | 0

| accepted

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...

8 dagen ago | 0

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...

8 dagen ago | 0

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...

8 dagen ago | 0

| accepted

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...

8 dagen ago | 0

| accepted

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...

8 dagen ago | 0

| accepted

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_...

9 dagen ago | 0

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

9 dagen ago | 0

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 =...

9 dagen ago | 0

| accepted

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...

9 dagen ago | 0

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 ...

9 dagen ago | 0