답변 있음
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일 전 | 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일 전 | 0

| 수락됨

답변 있음
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일 전 | 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...

6일 전 | 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일 전 | 1

| 수락됨

답변 있음
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일 전 | 0

| 수락됨

답변 있음
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일 전 | 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일 전 | 1

| 수락됨

답변 있음
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...

7일 전 | 0

| 수락됨

답변 있음
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...

7일 전 | 0

| 수락됨

답변 있음
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일 전 | 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일 전 | 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)...

8일 전 | 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일 전 | 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일 전 | 2

| 수락됨

답변 있음
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일 전 | 0

| 수락됨

답변 있음
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일 전 | 1

| 수락됨

답변 있음
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일 전 | 0

| 수락됨

답변 있음
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일 전 | 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일 전 | 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일 전 | 0

| 수락됨

답변 있음
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일 전 | 0

| 수락됨

답변 있음
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...

9일 전 | 0

| 수락됨

답변 있음
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일 전 | 0

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

9일 전 | 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일 전 | 0

| 수락됨

답변 있음
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일 전 | 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일 전 | 0

답변 있음
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'...

9일 전 | 1

| 수락됨

답변 있음
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...

9일 전 | 0

더로드