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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 2

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 2

| akzeptiert

Beantwortet
How do you write this "| "symbol in MATLAB?
The expression ((floor(mr/2)==ceil(mr/2)) | (floor(mc/2)==ceil(mc/2))) conceptually says ((number of rows is even) OR (number...

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 1

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

Beantwortet
How to select several intervals from a vector?
Idk. Here's three ways. They all use loops. Is there something more elegant? Prrrrobably. Is it faster? Probably depends. ...

fast 5 Jahre vor | 0

Beantwortet
when making array of several sound signals, it doesn't give correct sounds when indexing each element
Something like this keys = '8675309'; toneduration = 0.4; spaceduration = 0.1; fs = 8000; sourcetones = [697 770 852 941...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Remove the repetitive items in matrix
You're using solve to solve two independent equations as if they were a system, and solve is accordingly returning a set of poin...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
top- hat transform for signal processing
The tophat and bottomhat operations are the difference of the source image and the opening/closing of said image with the select...

fast 5 Jahre vor | 0

Beantwortet
Please let me know a way to use for loop to extract the first row elements from each column of data and check a condition and store these in a matrix
Something like this C = {'f' 'm' 'f' 'female' 'male'; '5.9' '6' '172' '' '180' }; g =...

fast 5 Jahre vor | 0

Beantwortet
I need some help with a mathlab project
Use a while loop. Switch-case is more concise. x = 0; while true fprintf('x is currently %d \n',x) uresp = input('...

fast 5 Jahre vor | 0

Beantwortet
sorting a cell array
Something like this: C = {3,1,6,[2,6,7],[4,10],10}; % don't call it 'cell' [~,idx] = sort(cellfun(@(x) x(1),C),'ascend'); C =...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Setting the color of specific cells in a heatmap that contains two types of data
You can use NaN to indicate out-of-range data h = rand(10,10); h(h<0.1) = NaN; hh = heatmap(h); hh.MissingDataLabel = 'h <...

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden