Answered
Please explain what this error is...
That's pretty straightforward problem and the error is quite simple to fix -- Your function definition line is function [eq1,e...

14 Tage ago | 1

| accepted

Answered
My polyfit function is displaying NaN
>> log10(0) ans = -Inf >> You can't do that!!! plot() and friends silently ignore NaN, +/-Inf so you don't see the zero ...

14 Tage ago | 0

Answered
Object oriented Programming problem
Don't need to save in the function with that name, just the output variable name chosen for the return value in the function def...

14 Tage ago | 1

Answered
I want to Display two matrices next to each other with some space between them
disp(table(Iapp,I,'VariableNames',{'Approximated','Exact'})) Salt to suit...

14 Tage ago | 1

| accepted

Answered
Trying to print a vector.
fprintf(doc,['k0 = ' repmat('%.3f ',1,numel(k0)) '.'],k0);

14 Tage ago | 1

| accepted

Answered
How to import Table and column header from two diffrent files?
W/o an example to confirm but from the description alone something like: tData=readtable('thedatafile.csv'); hdrs=readcell('th...

14 Tage ago | 1

| accepted

Answered
Change colors of individual strings of a figure
Well, it'll take a fair amount of detailed coding, but it can be done...as a crude illustration try the following code... close...

14 Tage ago | 1

| accepted

Answered
Why is readcell not functioning as expected?
If the creating and reading routines don't have some sort of semaphore arrangment to let the one know the file is closed it's po...

15 Tage ago | 0

Answered
Axis ticks and colorbar labels in bold (heatmap)?
Another case where TMW is too clever by far in creating an opaque graphics object -- you have to use the hidden properties to fi...

15 Tage ago | 0

| accepted

Answered
Round Datetime to certain minutes
interp1 will work... dt=datetime(2020,11,18,00,1+[0:30].',0); % sample datetime array dt20=datetime(2020,11,17,0,[20:30...

16 Tage ago | 0

| accepted

Answered
How do i add a seed
See <Controlling-random-number-generation> for discussion and links to rng function if it is needed to modify default seed to be...

17 Tage ago | 0

Answered
How to read gaps from an Excel in MATLAB
It's readmatrix probably that's the problem as it is designed for matrix input and you have what looks like two (or several) mat...

17 Tage ago | 0

| accepted

Answered
Reduce loops to Vectors in Viola Jones Algorithm
I don't have the time right now, but the two inner loops should be replaceable by filter2 or conv2. NB: filter2 has an internal...

19 Tage ago | 0

Answered
How would I be able to output ID's that satisfied an if statement?
Use logical indexing, "the MATLAB way". LIMIT=50; % don't put magic numbers inside code; use variables so can change ...

24 Tage ago | 0

Answered
Two cell arrays indexing
C=cellfun(@(a,b)b(a),A,B,'UniformOutput',false); It's just logical indexing in a background loop under the guise of cell addres...

25 Tage ago | 0

| accepted

Answered
How to plot over histogram function
>> figure(2) [h] = histogram(norm,100); ... Error using norm Not enough input arguments. >> Your code even if fix the abo...

25 Tage ago | 0

| accepted

Answered
Changing the range of values in a Matrix
E=2*pi/3500*E-pi;

25 Tage ago | 0

Answered
Numeric miscalculation on the 14th decimal place
MATLAB used double precision floating point for calculations which is good to roughly 15 decimal digits. Hence, when you subtra...

25 Tage ago | 2

| accepted

Answered
Please answer! How to use an if function effectively?
colmn_analyze=4; % desired column to compare colmn_target=2; % desired column to set valLimit=2; % limiting val...

25 Tage ago | 1

| accepted

Answered
i cant able to plot graph of this cord
y=@(x)c1*exp(-diff(x))+d*(sin(x)/(d^2+1))+d^2*(cos(x)/d^2+1); numel(diff(x)) is one less than numel(x) so the above will fail...

26 Tage ago | 0

Answered
Is there a way to change the value of a variable within a function?
You can do anything you want inside the function as long as you can write a definition of what it is that is to happen. You cou...

26 Tage ago | 0

| accepted

Answered
How to delete the first word in each line in txt file?
Read the file into string or cellstr array and extractAfter() the blank. Not feasible to do on disk; don't even think of trying...

26 Tage ago | 0

| accepted

Answered
FilePath including a variable
Variables are variables, not text. rootdir="C:\Users\Desktop\Test\"; % use variable so can change easily filespec="*.txt";...

26 Tage ago | 0

Answered
Convert 1X5 to 3X3
Probably more clever ways, but N=3; % number elements to duplicate A=a(1:N); % first row for i=2:numel(a)-(N-1) A...

27 Tage ago | 0

| accepted

Answered
Function : undefined function or variable
"wrote a function fun in a "Vc.m" file" but the function function [Vc] = fun(j,b,m,R) Vc(j) = E0-b.*log(j)-R.*j-m.*exp(n....

27 Tage ago | 0

| accepted

Answered
question regerding the print
Don't really understand the question/confusion... Live Scripts or Live Functions are just that -- they exist and can run only i...

27 Tage ago | 0

| accepted

Answered
Problem Calling Data While Using Linear Regression Model 'fitlm'
"this is [p]ossibly due to the Species column being a string column..." That's exactly the problem. See Coding systems for ca...

27 Tage ago | 1

Answered
How can I use the unique function to output all the different numbers following M from all the file names?
rootdir = '/Users/apple/Desktop/Project/Code/Data/'; % good! Using variable so can change: +1 d=dir(fullfile(rootdir,'*_dat...

27 Tage ago | 0

Answered
function to calculate rows with non-missing data
Don't need to write any functions -- use ismissing and friends with, perhaps sum and maybe all, any could be of interest as well...

28 Tage ago | 0

Answered
Kindly help me to find error in attached code to find leap years for a range
isleapyr=@(yr) (eomday(yr,2)==29);

28 Tage ago | 0

| accepted

Load more