Réponse apportée
imresize(...'bilinear') and interp2(...'linear') return different results
It is a bit hidden away in the documentation, but it has to do with antialiasing when shrinking an image: x = [0 0 1 1;... ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Constant solving with eval() doesnt work
Who told you you needed eval? If you want to substitute values into your symbolic function, you can use subs. And you shouldn't ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to convert cell to number in matlab
str2double returns NaN because '3;4' is not a number, it is two numbers. You need to split the text into different numbers first...

plus de 5 ans il y a | 1

Réponse apportée
help with gui share data
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. GUIDE uses guidata, ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
rearrangement rows of matrices
The easiest way is probably to use a cell as an intermediary step: A = repmat((1:15)',1,5); B = [A(1:5,:), A(6:10,:), A(11:15,...

plus de 5 ans il y a | 0

Réponse apportée
Folder Exists Check in another directory
Just create the full path name and test agains 'dir'. bright=fullfile(parentFolder,'Bright'); if ~exist(bright,'dir') ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to save in separate variables the new values from a loop?
Do not use numbered variables, use arrays instead. CO_ppb_Picarro= [27 30 28 32 30 31] ; %1x6 double mean_vec_CO{1}= [27 31 2...

plus de 5 ans il y a | 0

Réponse apportée
How do i do this?
Assuming that the comments in your screenshot are from the instructor guiding you through the writing of the function: I disagre...

plus de 5 ans il y a | 0

Réponse apportée
How to exclude certain values from an array?
Your current code is removing values from either the x or the y, instead of removing pairs. What you can do is define a logical ...

plus de 5 ans il y a | 1

Réponse apportée
Store all iterations in nested for loop
A={[30;31],[],[];[18;20;24],[27;24;26],[];[13;16;18],[14;16;17],[15;16;16];5,9,8}; NewMatrix=flipud(A).'; NewMatrix=NewMatrix(...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Callback function not able to update System
I prefer to use actual functions for my GUIs, see if this helps. Usually this also really helps with debugging. m = 8; ...

plus de 5 ans il y a | 0

Réponse apportée
Role of breakpoints in MATLAB
They are used for debugging. You can also set a conditional breakpoint (right-click on the dash). With a breakpoint you can p...

plus de 5 ans il y a | 0

Réponse apportée
How to change font size of text on figure?
If you look at the documentation, you will see that you have many optional parameters, one of which is the FontSize.

plus de 5 ans il y a | 1

Réponse apportée
how to modify displayed result
%% Input data m1=2; m2=2.5; m3=3; k1=10; k2=15; k3=20; g=9.81; %% calculus syms x1 x2 x3 [A,b]=equationsToMatrix([m1*g+k2*...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Extract variable from .mat files
I think I understand what you mean. You will have to use load to load a variable from a mat file: S = dir('*.mat'); LT= []; f...

plus de 5 ans il y a | 0

Réponse apportée
How to find the maximum row vector from the multiple row vectors
You can put it in a vector, instead of using multiple input arguments: maxDev(i)= max([maxDevU(i),maxDevV(i),maxDevW(i),maxDevX...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Add toolbox in MATLAB
Even if sometimes staff members look on this forum and post from time to time, the help on this forum is mostly provided by peop...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to display Command Window in App Designer in real time
Slightly expanding on the answer by Mario Malic: You need to retrieve the handle to your application, e.g. like this: app = ge...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
date and time formatting
See the datetime documentation for how to convert Excel dates to a datetime object that you can use in other functions. See the ...

plus de 5 ans il y a | 0

Réponse apportée
How can I convert a cell to a matrix ?
You need to use accumarray to create this. You can find examples in the documentation for that function: doc accumarray

plus de 5 ans il y a | 0

Réponse apportée
How to evaluate a polynomial p at each point in y?
As far as I'm aware, this is not directly possible. If you rewrite the p-factors you can still use polyval. y=p(1)*x+p(2) x=(y...

plus de 5 ans il y a | 1

Réponse apportée
Minimum Requirments for matlab
https://www.mathworks.com/support/requirements/matlab-system-requirements.html 4GB of memory is on the low side to expect good...

plus de 5 ans il y a | 0

Réponse apportée
How to create a new square matrix with entries of each middle point of each subsection of another larger square matrix?
The code below requires the Image Processing toolbox, although you can do it with loops and mat2cell as well. A=imread('pears.p...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Draw a line throw a set of point
For this code to work, you will need the attached fit_line function, and my point_to_line_distance, which you can find on the FE...

plus de 5 ans il y a | 0

Réponse apportée
How to optimise the code by using condition/loop ?
You can start by not using numbered variables. for n=1:20 S=load(sprintf('f%d_pH_con.mat',n)); f_pH{n}=S.(sprintf('f%...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to use fprintf in matlab?
The answer is in the documentation. The first digit in your formatspec specifies the maximum number of characters in your output...

plus de 5 ans il y a | 0

Réponse apportée
How to find last non-NaN element and replace it with NaN?
Loop over the rows, use isnan and use find with the 'last' switch.

plus de 5 ans il y a | 0

Réponse apportée
Load text file into matlab
Without seeing an example of your files, we can't tell you how to tweak the syntax you're using with readtable. Adapting the syn...

plus de 5 ans il y a | 0

Réponse apportée
coursera MATLAB course, blur image assignment
Using the smart indent is generally a good idea. Now let's go through your code (ignoring the quadruple nested loop that can pro...

plus de 5 ans il y a | 1

Réponse apportée
Plan section of my visual data
https://www.mathworks.com/help/matlab/ref/slice.html [X,Y,Z] = meshgrid(linspace(0,1000,50),linspace(0,1000,50),linspace(-500,...

plus de 5 ans il y a | 0

| A accepté

Charger plus