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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 1

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

Risposto
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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

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

oltre 5 anni fa | 1

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

oltre 5 anni fa | 0

| accettato

Carica altro