Réponse apportée
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...

presque 3 ans il y a | 1

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 2

Réponse apportée
plot a geographical map
Use geoscatter

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
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 =...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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.

presque 3 ans il y a | 0

Réponse apportée
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.

presque 3 ans il y a | 0

| A accepté

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

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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.

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 1

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
linsolve for coefficient matrix
You are looking for mrdivide, /.

presque 3 ans il y a | 2

| A accepté

Charger plus