Risposto
How to use an excel sheet as function?
Have to use COM and send <the Excel instruction to force recalculation>... I'd suggest to move the calculations into MATLAB as ...

oltre 2 anni fa | 2

| accettato

Risposto
real or categorical predictors, which one is faster?
Whether to use categorical or continuous variable is context sensitive and should be based on the model intent and interpretatio...

oltre 2 anni fa | 1

| accettato

Risposto
Addressing variables with special characters in the name
A brute-force, dead-ahead solution is at <Fix .mat file variable names>. It's simply string substitution...as @Walter Roberson ...

oltre 2 anni fa | 0

Risposto
How to make same subplot size at different figures regardless of the number of sub-plot?
The simplest would be to create the same number of subplots for all figures, just not use the extra ones. Alternatively, you ca...

oltre 2 anni fa | 1

Risposto
How do I extract the data corresponding to specific latitude and longitude from this 1x1 structure?
lat=48; lon=11; ixLat=find(GHI.lat==lat); ixLon=find(GHI.lon==lon); vals=GHI.data(ixLat,ixLon);

oltre 2 anni fa | 0

Risposto
Checking whether excel file is opened?
Excel creates a hidden file of the same base name prefixed with "~$" when it opens a file -- this is the backup copy. This file...

oltre 2 anni fa | 0

Risposto
"Publish" code with bugs
publish writematrix("A = [1 2; 3];",'trial_script.m','FileType','text') type trial_script.m publish('trial_script.m') While ...

oltre 2 anni fa | 0

| accettato

Risposto
trying to find which row this specific date time is at in an excel sheet
Presuming (although you didn't tell/show us) from the "dot" notation you used readtable to load the data into MATLAB, NumRows=h...

oltre 2 anni fa | 1

Risposto
I want to store the vector from each for-loop iteration, how can I do this?
You're almost there, you've just got to wrap your head around coding in "the MATLAB way"... nR=256; nC=256; % i...

oltre 2 anni fa | 1

| accettato

Risposto
I want to find the integration under the exported graph whose function is not known. How to do this?
" I have data points and after plotting the graph i need to find the area under it how do i do that?" <See example at> that is ...

oltre 2 anni fa | 0

Risposto
How to plot a graph like this??
scatter it is, indeed. From the link, "specify x and y as matrices of equal size. In this case, scatter plots each column of y ...

oltre 2 anni fa | 0

| accettato

Risposto
Function "diff" and the loss of an element in the array
diff is defined as x(i+1)-x(i) for i=2:numel(x). But, MATLAB arrays are always 1-based so the result of x(2)-x(1) is in the fir...

oltre 2 anni fa | 0

Risposto
how do I use importdata() to import specific columns of data from a .txt file?
importdata returns an array, not a struct nor table -- it has its uses, but I generally avoid it for more specific functions tha...

oltre 2 anni fa | 0

Risposto
Pass input arugments in .exe file generated by Matlab coder
<You must modify a main.c> function to read/use an argument list when creating a standalone executable; it doesn't happen by def...

oltre 2 anni fa | 0

| accettato

Risposto
readtable(html file) producing extra empty columns
Use 'SelectedVariableNames' with the variable(s) desired I can't tell what you want, specifically, there's a comment to read on...

oltre 2 anni fa | 0

Risposto
How do I add these two variables? i keep on getting an error.
We don't know enough to be complete, but assuming the two input values are numeric, then function AddButtonPushed(app, event) ...

oltre 2 anni fa | 0

Risposto
Add zero padding to fft for accurate estimation
Returning the one-sided frequency spectrum instead of two-sided (the zero frequency/DC component is in the middle). Fs = 1e3; ...

oltre 2 anni fa | 0

Risposto
How to set characters font in excel by m-file?
Worksheet.Range('A1').Characters('Start:=2, Length:=2').Font.ColorIndex = 3; % 2nd and 3rd characters color red, NG MATLAB does...

oltre 2 anni fa | 0

| accettato

Risposto
Simple array multiplication of incompatible sized arrays
What KIND of "multiply"? "*" is matrix multiplication and SV=rand(62,3); NED=rand(186,3); M=NED*SV.'; whos M so you can mu...

oltre 2 anni fa | 1

| accettato

Risposto
Correlation and regression between matrixes with NaN values
"...regression and correlation coefficent between two matrixes (temperature and sea level pressure), ... to have a .... for ever...

oltre 2 anni fa | 2

Risposto
Calculate values of struct of struct
The problem of using sequentially-named fields in the struct instead of an array of struct; there's no good way to process the r...

oltre 2 anni fa | 1

Risposto
Modify invalid field names in .mat file using code
unzip ExampleFile dir whos -file ExampleFile _* %S=load('ExampleFile') % _ADU_Odometer fid=fopen('ExampleFile.mat','r'); [f...

oltre 2 anni fa | 0

Risposto
Renaming files with the name of All subfolders
Undoubtedly this is the wrong-headed approach, don't use metadata inside the file names but create a database that contains the ...

oltre 2 anni fa | 0

Risposto
How to repeat data because of variables with two different timestamps?
Illustrate -- t=seconds(0:1:300).'; % one-second time series arbitrar...

oltre 2 anni fa | 0

| accettato

Risposto
How can I generate a legend of two combined figures? I
%um die diagonalen Beinpaare in eine Abbildung zu bekommen, inkl %Auftrittspunkte VR= openfig('bueVR150GZ.fig','invisible'); ...

oltre 2 anni fa | 0

| accettato

Risposto
How to transform a table to a matrix?
xlsread has been deprecated because it is more difficult to use with irregular data than the table. You can't put different dat...

oltre 2 anni fa | 1

| accettato

Risposto
Can I draw a section of a polar plot?
Well, sorta', but not totally generic. hPax=polaraxes('thetalim',[0 20],'thetazerolocation','top','thetadir','clockwise','rlim'...

oltre 2 anni fa | 0

| accettato

Risposto
iterating a function within itself
Several issues here... function [A1,B1,C1,D1,NPI_new,CPI_new] =CSS_iterate(fdrpath1,sheetname,RepCondpath) [A,B,C,D,NPI,CPI]=A...

oltre 2 anni fa | 0

Risposto
Plot multiple variables from table with different x axes
There's also no need to loop; use the array inputs version of stairs D_indices=[1:3:width(map1)]; % would be all; limit...

oltre 2 anni fa | 1

Risposto
Back calculating Ki from test data
You can only have N-1 differences. See diff for "the MATLAB way"... For a loop, you simply start with j=2 instead of 1; done w...

oltre 2 anni fa | 0

| accettato

Carica altro