Beantwortet
cell配列に格納されているクラス名によって色を変えて画像を表示するにはどうすればよいですか?
%colors r = [1 0 0]; b = [0 0 1]; %Random data in = {'inu', 'neko'}; idx = randi(2,512,512); in = in(idx); %% If the...

mehr als 2 Jahre vor | 1

Beantwortet
question about code error
Since you are working with sides, assume the symbolic variable "a" to bepositive. And although angles can be negative, for the g...

mehr als 2 Jahre vor | 0

Beantwortet
combine bar chart with a line plot
plot expects the inputs as numerical values. You can plot the values directly, for which the x-values will be the corresponding...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
how can a symbolic derivative be vectorized automatically?
Convert it to a function handle - syms a b c f = a*sin(b)*exp(c) df = diff(f,b) %Convert the symbolic function to an anonym...

mehr als 2 Jahre vor | 2

Beantwortet
plot a geographical map
Use geoscatter

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Where to find model from example?
You can refer to this particular section of the link you have provided - Required MathWorks Products to know about the products ...

mehr als 2 Jahre vor | 0

Beantwortet
Replace a variable in a fuction handle by a function
You can directly substitute the expression into the function handle - originalM = @(c,x)(exp(-(0.5+exp(-c(3)+c(4)))*x(:,1).*e...

mehr als 2 Jahre vor | 0

Beantwortet
Error using 'splitapply' when the first bin has no entries
That is a limitation (for the lack of a better word) of splitapply. Please try this method with accumarray - array = Frequen...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Histogram over occurrences of adjacent equal numbers
As the data comprises of 0 and 1 only, a text based approach works good here - M = [ 1 0 1 0 1 0 1 ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
I need to isolate certain values of a matrix based on whether one of the values fall in a certain range
Here's a general approach - Discretize the data according to the groups and then split then into cells. bins = 0:30:300; idx =...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
How to add error bars to a 3D graph
You can plot vertical bars on each data point - x = 0:0.5:10; y = 2*sin(x); z = 3*cos(x); %Define the upper and lower err...

mehr als 2 Jahre vor | 0

Beantwortet
How do i get the editor window above the command window back on mac?
Go to the Home menu, and change the Layout to the default one.

mehr als 2 Jahre vor | 0

Beantwortet
Using xlswrite with cell array, how to keep column of numerals as strings?
As you are working with R2023b, use writecell. Note that the use of xlswrite is not recommended.

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How do I fill the image completely into the chart in App Designer?
A general solution would be - axis('tight')

mehr als 2 Jahre vor | 0

Beantwortet
For loop producing correct values but returning zeros
It might look like the values are zero, but they are not. However, compared to the values obtained at the later iterations, th...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How can I extract frequency values of intensity from multiple image files to one Excel file
You have done almost everything correct. However, you are over-writing the excel file with each iteration, thus you will only ge...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Find the closest match between an RGB triplet and a 3d RGB matrix
There are plethora of methods available for comparison. I have used absolute minimum and euclidean norm for example - I am ass...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How can I create 2D graph with three arguments in matlab? Picture with an example chart which i try to create in description.
Use plot. You can refer to the link for the syntax to use the functionality.

mehr als 2 Jahre vor | 0

Beantwortet
barh, reversing bar colors
Define 'FaceColor' as 'Flat' and assign the color of each stacked bar manually - fig=figure(1); y=[100 120 150 ; 150 120...

mehr als 2 Jahre vor | 0

Beantwortet
Loop over combinations of elements of several vectors
Use ndgrid - x1 = 1:5; x2 = [2 3 5 7 11]; x3 = [2 4 6 8 10]; %Store vectors in a cell array x = {x1,x2,x3}; n = numel...

mehr als 2 Jahre vor | 1

Beantwortet
Change the size 2 uiaxes
Experiment with the position values and see which values gives you the best/preferred output. I have posted the values I have tr...

mehr als 2 Jahre vor | 0

Beantwortet
How to color a region of a plot
You can set the corresponding values to NaN and change the color of the NaN values to white (or rather transparent) - x=linspa...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
MATLAB plotting undefined points
An alternative is to use the corresponding numeric functions - figure fplot(@csc, [-10 10], 'b') hold on fplot(@sin, [-10 10...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
Sum of all elements of a matrix, whose indices satisfy a condition
Yes. Logical indexing - Find Array Elements That Meet a Condition %Assuming c is vector with atleast n elements and A is nxn a...

mehr als 2 Jahre vor | 0

Beantwortet
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Double ampersand (&&) are only applicable when the output of each expression used for comparison is a scalar - Short-Circuit AND...

mehr als 2 Jahre vor | 0

Beantwortet
How to convert images to vectors
From what I have understood - %Random input in = rand(120,160,1,888); s = size(in); %Convert the input to a cell vector ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
plot earthquake locations data on a geotiff file
You should be using geoplot, geoscatter and mapshow/geoshow instead of plot(), scatter() and imshow(). If, even after making th...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
fprintf automatic spacing for strings of different lenghts
Vectorized version - %Sample data cities1 = ["Vila Ló", "Pião", "Chão de Frades", "Salmorrete", "Tortolindo"]; cities2 = cit...

mehr als 2 Jahre vor | 0

Beantwortet
Barh, bars are not correctly displayed.
The bars are centered around the x-positions, thus they are horizantlly distributed. However, you have shown a limited portion...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
linsolve for coefficient matrix
You are looking for mrdivide, /.

mehr als 2 Jahre vor | 2

| akzeptiert

Mehr laden