Réponse apportée
How to delete/copy (store) rows of a struct?
You can do as a regular array : myStruct; % 1x45 strcu-array % Split index k = numel(myStruct) - 13; % Slice structure ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
for loop array with increment. changing answer from vertical to horizontal
f = input ("Input first number: "); s = input ("Input second number:"); disp(f:s)

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Reference changing field names in loop
You can access a field dynamically by putting the name of the field in a var in brackets. for i=1:32 field = sprintf('chan...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
If I have Matlab trial version can i use matlab online ?
You probably just have a classic MATLAB / Simulink trial version, it does not include other toolboxes. As a matter of fact MATL...

plus de 5 ans il y a | 0

Réponse apportée
Export_fig conversion help
If you saved your figures in a FIG-File, then fig_handle = openfig(filename) will open it. Here a link to openfig documentati...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Undefined Variable error for a variable that is already defined?
a is defined in a if statement. if (d(i).isdir == 1 && length(d(i).name) > 2) If it's false, either d is not a dir or is name...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Enter two numbers to generate a regular sequence
nchoosek(1:A, D) Here a link to nchoosek documentation.

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Problem with parfor-loop. Unable to classify a variable in the body of the parfor-loop. Can someone help me?
You cannot create a structure in a parfor-loop using dot notation assignment. Here is a workaround parfor i = 1:height(S) ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Index in position 1 exceeds array bounds (must not exceed 301) and Error in IMR_2psv (line 34) u(i,:)=(1/16)*(-u(i-2,:)+4*u(i-1,:)+10*u(i,:)+4*u(i+1,:)-u(i+2,:));
Your last loop go one step too far. u is 301x151 and n = 300. Then u(n+2) exceeds array bounds. clear; Lmax = 1.0; % Maximum l...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to use .m files from complex matlab program in app designer code
You can't do this directly in appdesigner interface. A workaround is to create a class folder (@MyClass) and put you *.mlapp and...

plus de 5 ans il y a | 0

Réponse apportée
Different behaviour of hold on depending on order
Didn't know you can create axes with hold on command. This kind of command, such as axis equal, change properties of your graph...

plus de 5 ans il y a | 0

| A accepté

Question


How to close an uialert programmatically
I'm developping some tests with the matlab.uitest framework. Everything is fine until my app generates an uialert, which is expe...

plus de 5 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to change the scale of plot axes? How to plot circle using separate x and y equations?
A call to axis equal After creating your plot will set the same length for the data units along each axis.

plus de 5 ans il y a | 1

Réponse apportée
doubt in specific line
The line is settings to 1 elements of matrix region from row y_up(i) to row y_lo(i)+size(img_filt_lo,1) in column i. I suppose ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Extract vector from math file
You can use the matfile function to access and change variables in MAT-file without loading file into memory matObj = matfile('...

plus de 5 ans il y a | 0

Réponse apportée
Plotting a graph properly
%% Plotting %code for plotting the real values of volume vs time V_real = real(V); valid = V_real<0; V_real(valid) = 0; plo...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to call files with location names of >1 words?
You can delete all spaces with the command strrep(str, ' ', '') Then location = lower(strrep(app.location.Value, ' ', '')); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to search for substrings in a string?
You can specify that you want exactly 4 digits after '_K' my_strings = '1583_pwer_exp_Exxxx_aqxxx_tqx_K2_vxxx_K1001_' tmp = re...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting a graph properly
This happens because your data looks like that : WR_real(:,:,1) = [0 1.1 ... 0.2 0 0]*1e-3 To get rid of those lines, remove t...

plus de 5 ans il y a | 0

Réponse apportée
How to call data from a structure array?
You cannot name a field with just numbers % This is not a correct syntax experiments(2).weights.1 = 111.45; experiments(2).we...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to create a legend with multiple colored squares?
% Create an axe hAxe = axes(...); % Get your patches handles hGreen = patch(hAxe, ...); hYellow = patch(hAxe, ...); hRed ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Struct using an Index?
Yes, you can totally creat a structure array. s(1) = struct('f1','a','f2', 1) % Add a value to field f2 in element 3 s(3).f...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
MatLab returns false figure size in script
Add a call to drawnow after creating the figure %% Creating GUI GUI=uifigure('Name','Spectrograms',... 'Numbe...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How do you count points above the horizontal line?
% Data array Data = [....] % Treshold Limit = 0; % Count AboveLimit = sum(Data > Limit)

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to change output from column to row?
You are printing in a loop with a line return at each step. This works : a = input('Enter first number:'); b = input('Enter se...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to collapse within a column vector
You can use the sum function after reshape your vector into a matrix vX = 1:9; Interval = 3; mX = reshape(vX, Interval, num...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Creating a 3d array from 1d vectors
Look for meshgrid or ndgrid functions, you may find what you want

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Express data in percentage
[h1, edges1] = histcounts(ascending_LWP, 'Normalization', 'probability'); [h2, edges1] = histcounts(descending_LWP, 'Normalizat...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to plot graph?
x=[10, 20 ,30,40,50] y=[0.987, 0.972, 0.958, 0.938, 0.919] plot(x, y, 'LineStyle', 'none', 'Marker', '.') Here is the plot do...

plus de 5 ans il y a | 0

Réponse apportée
dot indexing not supported by variable of this type
Your variable const is a global one. First of all, use of global variables is widely not reccomended, read this article for more...

plus de 5 ans il y a | 0

Charger plus