Respondida
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;... ...

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

Respondida
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, ...

más de 5 años hace | 0

| aceptada

Respondida
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,...

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

Respondida
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(...

más de 5 años hace | 0

| aceptada

Respondida
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; ...

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

Respondida
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*...

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

Respondida
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

más de 5 años hace | 0

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

más de 5 años hace | 1

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

Respondida
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%...

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

Respondida
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,...

más de 5 años hace | 0

| aceptada

Cargar más