Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Trying to print a vector.
fprintf(doc,['k0 = ' repmat('%.3f ',1,numel(k0)) '.'],k0);

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 5

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Changing the range of values in a Matrix
E=2*pi/3500*E-pi;

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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....

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

| A accepté

Charger plus