Month: July 2024
imcrop not working for tiff
Hi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
endHi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
end Hi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
end .tiff, image processing, imcrop MATLAB Answers — New Questions
Keyword search doesnt work for applications in Software Center
MCM (SCCM) 2403
it seems that searching for keywords (set for application in Software Center) seems to be broken in our environment
If i add “abcxyz” to an application as keyword it could not be found via Software Center but if i add it the localized description the application could be found
Any ideas here?
MCM (SCCM) 2403it seems that searching for keywords (set for application in Software Center) seems to be broken in our environmentIf i add “abcxyz” to an application as keyword it could not be found via Software Center but if i add it the localized description the application could be foundAny ideas here? Read More
Automatically select drop down list option based on value of other cell
Hi all
I have a column with cells that are populated from a drop down list. I would like one of the list options to be populated auotmatically based on the value of another cell but I am not sure if this is possible.
I would usually use an IF formula for this but can’t with a drop down list as the cells are restricted to the list options so no formla can be added to them. Is there another way to do it?
Thank you
Hi all I have a column with cells that are populated from a drop down list. I would like one of the list options to be populated auotmatically based on the value of another cell but I am not sure if this is possible.I would usually use an IF formula for this but can’t with a drop down list as the cells are restricted to the list options so no formla can be added to them. Is there another way to do it?Thank you Read More
Conditional access issue with app exclusion.
Hi,
We have a conditional access policy (Grant) with some controls and a few apps excluded. The exclusion does not work. The “What if” tool shows everything correctly, but the user is still affected by the policy even when trying to use an excluded app. Sign-in logs show that the policy was triggered as well. Has anyone experienced something like this?
Hi, We have a conditional access policy (Grant) with some controls and a few apps excluded. The exclusion does not work. The “What if” tool shows everything correctly, but the user is still affected by the policy even when trying to use an excluded app. Sign-in logs show that the policy was triggered as well. Has anyone experienced something like this? Read More
Getting local admins from all PCs
Hello,
I am new to power shell scripting and i got a task where i need to restive all the users that have local admins on their devices.
Any help?
I managed to create a script but i got errors on all users.
This is the script:
#Get Current Computer Name
$computer = $env:computername
#Get Current UserName
$CurrentUser = whoami
#Get User’s Local Group Membership
$CurrentUserGroups = whoami /groups
#Check if current user is a member of the Local Admins group
$CurrentUserAdmin = $CurrentUserGroups -like “*S-1-5-32-544*”
#If user is an admin
if ($CurrentUserAdmin) {
$body = ConvertTo-JSON @{Device = $computer; User = $CurrentUser; IsAdmin = ‘true’}
#Start Flow
Invoke-RestMethod -uri $URI -Method Post -body $body -ContentType ‘application/json’
}
#If user is not an admin
else {
$body = ConvertTo-JSON @{Device = $computer; User = $CurrentUser; IsAdmin = ‘false’}
#Start Flow
Invoke-RestMethod -uri $URI -Method Post -body $body -ContentType ‘application/json’
}
Hello, I am new to power shell scripting and i got a task where i need to restive all the users that have local admins on their devices.Any help? I managed to create a script but i got errors on all users.This is the script:#Get Current Computer Name$computer = $env:computername#Get Current UserName$CurrentUser = whoami#Get User’s Local Group Membership$CurrentUserGroups = whoami /groups#Check if current user is a member of the Local Admins group$CurrentUserAdmin = $CurrentUserGroups -like “*S-1-5-32-544*”#If user is an adminif ($CurrentUserAdmin) {$body = ConvertTo-JSON @{Device = $computer; User = $CurrentUser; IsAdmin = ‘true’}#Start FlowInvoke-RestMethod -uri $URI -Method Post -body $body -ContentType ‘application/json’}#If user is not an adminelse {$body = ConvertTo-JSON @{Device = $computer; User = $CurrentUser; IsAdmin = ‘false’}#Start FlowInvoke-RestMethod -uri $URI -Method Post -body $body -ContentType ‘application/json’} Read More
¿Could you help me to activate MatLab?
I had a crash in my computer, I downloaded again the application, but I have no the activation Key
Thanks in advance and Best Regards
Jaime TamaritI had a crash in my computer, I downloaded again the application, but I have no the activation Key
Thanks in advance and Best Regards
Jaime Tamarit I had a crash in my computer, I downloaded again the application, but I have no the activation Key
Thanks in advance and Best Regards
Jaime Tamarit activation of matlab MATLAB Answers — New Questions
Solver stopped prematurely. fsolve stopped because it exceeded the function evaluation limit, options.MaxFunctionEvaluations = 2.000000e+02.
I want to solve a system of equations containing two non-linear equations, one of which is Psh==Pse,the other is Qs==0, but solving it with the fsolve function doesn’t achieve the given constraints, how can I solve this problem?
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
rho=0:2*pi/24:2*pi;
V_se=0.2*V_r;
Z_r=j*X_r;
for m=1:25
fun=@(x)myfun(x,rho(m));
x0=[0 0];
[x,fval,exitflag(m),~]=fsolve(fun,x0);
gamma(m)=x(1);
I_sh(m)=x(2);
I_r(m)=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho(m))-V_r*exp(j*theta_r)-j*X_t*I_sh(m)*exp(j*gamma(m)));
V_c1(m)=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh(m)*exp(j*gamma(m))+I_r(m));
Psh(m)=real(V_c1(m)*conj(I_sh(m)*exp(j*gamma(m))));
Pse(m)=real(V_se*exp(j*rho(m))*conj(I_r(m)));
Pr(m)=real(V_r*exp(j*theta_r)*conj(I_r(m)));
Qr(m)=imag(V_r*exp(j*theta_r)*conj(I_r(m)));
Sr(m)=sqrt(Pr(m)^2+Qr(m)^2);
Ps(m)=real(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Qs(m)=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Ss(m)=sqrt(Ps(m)^2+Qs(m)^2);
end
plot( Ps/Srate,Qs/Srate,LineWidth=2,color='[0.9290 0.6940 0.1250]’)
function y=myfun(x,rho)
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
V_se=0.2*V_r;
Z_r=j*X_r;
%%%%%%%%%%%%%%%%Two constraints,Psh==Pse,Qs==0
gamma=x(1);
I_sh=x(2);
I_r=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho)-V_r*exp(j*theta_r)-j*X_t*I_sh*exp(j*gamma));
V_c1=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh*exp(j*gamma)+I_r);
Psh=real(V_c1*conj(I_sh*exp(j*gamma)));
Pse=real(V_se*exp(j*rho)*conj(I_r));
Qs=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r+I_sh*exp(j*gamma)));
y=[Psh-Pse; Qs];
endI want to solve a system of equations containing two non-linear equations, one of which is Psh==Pse,the other is Qs==0, but solving it with the fsolve function doesn’t achieve the given constraints, how can I solve this problem?
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
rho=0:2*pi/24:2*pi;
V_se=0.2*V_r;
Z_r=j*X_r;
for m=1:25
fun=@(x)myfun(x,rho(m));
x0=[0 0];
[x,fval,exitflag(m),~]=fsolve(fun,x0);
gamma(m)=x(1);
I_sh(m)=x(2);
I_r(m)=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho(m))-V_r*exp(j*theta_r)-j*X_t*I_sh(m)*exp(j*gamma(m)));
V_c1(m)=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh(m)*exp(j*gamma(m))+I_r(m));
Psh(m)=real(V_c1(m)*conj(I_sh(m)*exp(j*gamma(m))));
Pse(m)=real(V_se*exp(j*rho(m))*conj(I_r(m)));
Pr(m)=real(V_r*exp(j*theta_r)*conj(I_r(m)));
Qr(m)=imag(V_r*exp(j*theta_r)*conj(I_r(m)));
Sr(m)=sqrt(Pr(m)^2+Qr(m)^2);
Ps(m)=real(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Qs(m)=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Ss(m)=sqrt(Ps(m)^2+Qs(m)^2);
end
plot( Ps/Srate,Qs/Srate,LineWidth=2,color='[0.9290 0.6940 0.1250]’)
function y=myfun(x,rho)
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
V_se=0.2*V_r;
Z_r=j*X_r;
%%%%%%%%%%%%%%%%Two constraints,Psh==Pse,Qs==0
gamma=x(1);
I_sh=x(2);
I_r=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho)-V_r*exp(j*theta_r)-j*X_t*I_sh*exp(j*gamma));
V_c1=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh*exp(j*gamma)+I_r);
Psh=real(V_c1*conj(I_sh*exp(j*gamma)));
Pse=real(V_se*exp(j*rho)*conj(I_r));
Qs=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r+I_sh*exp(j*gamma)));
y=[Psh-Pse; Qs];
end I want to solve a system of equations containing two non-linear equations, one of which is Psh==Pse,the other is Qs==0, but solving it with the fsolve function doesn’t achieve the given constraints, how can I solve this problem?
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
rho=0:2*pi/24:2*pi;
V_se=0.2*V_r;
Z_r=j*X_r;
for m=1:25
fun=@(x)myfun(x,rho(m));
x0=[0 0];
[x,fval,exitflag(m),~]=fsolve(fun,x0);
gamma(m)=x(1);
I_sh(m)=x(2);
I_r(m)=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho(m))-V_r*exp(j*theta_r)-j*X_t*I_sh(m)*exp(j*gamma(m)));
V_c1(m)=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh(m)*exp(j*gamma(m))+I_r(m));
Psh(m)=real(V_c1(m)*conj(I_sh(m)*exp(j*gamma(m))));
Pse(m)=real(V_se*exp(j*rho(m))*conj(I_r(m)));
Pr(m)=real(V_r*exp(j*theta_r)*conj(I_r(m)));
Qr(m)=imag(V_r*exp(j*theta_r)*conj(I_r(m)));
Sr(m)=sqrt(Pr(m)^2+Qr(m)^2);
Ps(m)=real(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Qs(m)=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r(m)+I_sh(m)*exp(j*gamma(m))));
Ss(m)=sqrt(Ps(m)^2+Qs(m)^2);
end
plot( Ps/Srate,Qs/Srate,LineWidth=2,color='[0.9290 0.6940 0.1250]’)
function y=myfun(x,rho)
V_s=10*1e3/sqrt(3);
n_t=25*sqrt(3);
V_r=400/sqrt(3);
theta_r=pi/12;
Srate=100*1e3/3;
Zbase=(V_r)^2/Srate;
X_r=0.4*Zbase;
X_t=400^2/(150*1e3)*4/100;
V_se=0.2*V_r;
Z_r=j*X_r;
%%%%%%%%%%%%%%%%Two constraints,Psh==Pse,Qs==0
gamma=x(1);
I_sh=x(2);
I_r=1/(Z_r+j*X_t)*(sqrt(3)*V_s*exp(j*pi/6)/n_t+V_se*exp(j*rho)-V_r*exp(j*theta_r)-j*X_t*I_sh*exp(j*gamma));
V_c1=sqrt(3)*V_s*exp(j*pi/6)/n_t-j*X_t*(I_sh*exp(j*gamma)+I_r);
Psh=real(V_c1*conj(I_sh*exp(j*gamma)));
Pse=real(V_se*exp(j*rho)*conj(I_r));
Qs=imag(sqrt(3)*V_s*exp(j*pi/6)/n_t*conj(I_r+I_sh*exp(j*gamma)));
y=[Psh-Pse; Qs];
end fsolve, solving systems of nonlinear equations MATLAB Answers — New Questions
How to run two simulink models in parallel?
Hello everyone,
I am working with a 3DOF model of a commercial airplane in MatLab/Simulink. This model contains the state propagator and the autopilot. I would like to train an RL agent using the outputs of this model. The problem is that the environment for the RL application contains an exact copy of the state propagator of the 3DOF model. How can I use two of these systems without conflicting with the goto/from blocks and the signal name?
Thank youHello everyone,
I am working with a 3DOF model of a commercial airplane in MatLab/Simulink. This model contains the state propagator and the autopilot. I would like to train an RL agent using the outputs of this model. The problem is that the environment for the RL application contains an exact copy of the state propagator of the 3DOF model. How can I use two of these systems without conflicting with the goto/from blocks and the signal name?
Thank you Hello everyone,
I am working with a 3DOF model of a commercial airplane in MatLab/Simulink. This model contains the state propagator and the autopilot. I would like to train an RL agent using the outputs of this model. The problem is that the environment for the RL application contains an exact copy of the state propagator of the 3DOF model. How can I use two of these systems without conflicting with the goto/from blocks and the signal name?
Thank you simulink, subsystem, scope MATLAB Answers — New Questions
Apps detected as Trojan by Microsoft Defender: Opinion require
Hi,
Last time, my apps was detected as malware by Microsoft Defender (MD). But at that time, we just submit the file for analysis and then MD no longer detect my apps as malware after the ticket close.
However, for my new revamped application from previous version, the analysis failed and tell me that my apps contained malware. It is a VPN application that alter the virtual network for tun interface.
Any thoughts or approach that I can take from here until I MD remove the false detection?
Hi, Last time, my apps was detected as malware by Microsoft Defender (MD). But at that time, we just submit the file for analysis and then MD no longer detect my apps as malware after the ticket close. However, for my new revamped application from previous version, the analysis failed and tell me that my apps contained malware. It is a VPN application that alter the virtual network for tun interface. Any thoughts or approach that I can take from here until I MD remove the false detection? Read More
Stream Moves to Intelligent Versioning
In a change designed to reduce the consumption of storage quota, Stream video versions are no longer being generated for non-video updates such as changes to video metadata. Anything that alters the video content, like trimming some seconds from the start or end of a video, will create a new version. It seems like a perfectly reasonable change to make that might help SharePoint storage not be consumed quite so quickly.
https://office365itpros.com/2024/07/24/stream-video-versions/
In a change designed to reduce the consumption of storage quota, Stream video versions are no longer being generated for non-video updates such as changes to video metadata. Anything that alters the video content, like trimming some seconds from the start or end of a video, will create a new version. It seems like a perfectly reasonable change to make that might help SharePoint storage not be consumed quite so quickly.
https://office365itpros.com/2024/07/24/stream-video-versions/ Read More
Game recording app keeps asking for PIN password?
Is this safe and should I delete the app from my computer?
Is this safe and should I delete the app from my computer? Read More
How to create view joining two table of similar records without duplicating.
Hi All,
Hope all are doing great. I have a small query regarding the Join function to create view. I have two table in which table 1 is having 40k records and table 2 is having 40k records. But when i am joining the both to create view, it is showing 47k records. Please note that i am combining table using two common column in both, one is “Calendar_Date” and one is “Personal_ID”. In some cases few Personal ID has duplicate records for each month. So while creating the view the, these duplicate records gets multiplied . Hence the total records exceeds 47k. How to make it same 40k records which i am having in each table.
Any help would be highly appreciated.
Regards,
Sagar
Hi All,Hope all are doing great. I have a small query regarding the Join function to create view. I have two table in which table 1 is having 40k records and table 2 is having 40k records. But when i am joining the both to create view, it is showing 47k records. Please note that i am combining table using two common column in both, one is “Calendar_Date” and one is “Personal_ID”. In some cases few Personal ID has duplicate records for each month. So while creating the view the, these duplicate records gets multiplied . Hence the total records exceeds 47k. How to make it same 40k records which i am having in each table. Any help would be highly appreciated. Regards,Sagar Read More
Pictures integrated in a list- not visible- error code #UNKNOWN!
Hi all,
I have a problem. I get a list from a company I am working with and they integrate pictures in the list.
I get an error message that the pictures are #UNKNOWN!
See attached screenshots.
I updated already to the newest version of Excel. I am using a MacBook Air- MAC OS Ventura 13.1.
And I am the only one having problems with this list.
Everybody else using it can see the pictures.
Appreciate your help.
Hi all, I have a problem. I get a list from a company I am working with and they integrate pictures in the list.I get an error message that the pictures are #UNKNOWN!See attached screenshots. I updated already to the newest version of Excel. I am using a MacBook Air- MAC OS Ventura 13.1. And I am the only one having problems with this list.Everybody else using it can see the pictures. Appreciate your help. Read More
Microsoft Cost Management updates—June 2024 (summary)
FinOps X 2024 was a hit. To learn about our announcements, see News and updates from FinOps X 2024.
Cost Management announced FOCUS 1.0 support in exports.
Review an estimate of your costs when you deploy virtual machines in the Azure portal.
Access Cost analysis from the Azure Kubernetes Service cluster menu.
Pricing updates on Azure.com including new regions, new services, and a slew of updates for services like Virtual machines, Azure SQL DB, Azure Data Factory, Azure Functions, and more.
New ways to save money with Microsoft cloud:
VM Hibernation is now Generally Available
Documentation updates spanning Cost Management, Azure Hybrid Benefit, reservations, Marketplace charges, and Billing experiences.
This is just a quick summary. For the full details, please see Microsoft Cost Management updates—June 2024.
Microsoft Tech Community – Latest Blogs –Read More
Save a stack of 16-bit images to one TIFF file
Hi,
I would like to save a stack (in this case 150) of uint16 grayscale images to a single TIFF-file. First I tried pass over the 3D-array (the third dimension are the individual images) to imwrite, but it complained "Writing TIFFs with 150 components is not supported with IMWRITE. Use Tiff instead. ". I tried this (imgdata is my 3D-array of images):
imgdata = uint16(imgdata);
tagstruct.ImageLength = size(imgdata,1);
tagstruct.ImageWidth = size(imgdata,2);
tagstruct.Photometric = Tiff.Photometric.MinIsBlack;
tagstruct.BitsPerSample = 16;
tagstruct.SamplesPerPixel = 1;
tagstruct.PlanarConfiguration = Tiff.PlanarConfiguration.Chunky;
tagstruct.Software = ‘MATLAB’;
tagstruct.Compression = 1;
t = Tiff(path,’w’);
setTag(t,tagstruct);
write(t,imgdata);
I got the error message "SamplesPerPixel is 1, but the number of image planes provided was 150.", so write() interprets the third dimension as the samples per pixel, which is not what I want. Samples per Pixel needs to be 1, as I have grayscale images.
After that, I also tried it with the "append" option and a loop over the images (with the same tagstruct as above)
t = Tiff(path,’a’);
setTag(t,tagstruct);
numberOfImages = size(imgdata,3);
for n=1:numberOfImages
currentImage = squeeze(imgdata(:,:,n));
write(t,currentImage);
end
close(t);
It runs without errors and the file size of the uncompressed file is exactly what I would expect, so I think the data is in the file. But I can’t open the file in any other software than matlab. Irfanview, imageJ, Windows image viewer all show just the first image of the stack.
Any ideas what’s wrong? Thanks.Hi,
I would like to save a stack (in this case 150) of uint16 grayscale images to a single TIFF-file. First I tried pass over the 3D-array (the third dimension are the individual images) to imwrite, but it complained "Writing TIFFs with 150 components is not supported with IMWRITE. Use Tiff instead. ". I tried this (imgdata is my 3D-array of images):
imgdata = uint16(imgdata);
tagstruct.ImageLength = size(imgdata,1);
tagstruct.ImageWidth = size(imgdata,2);
tagstruct.Photometric = Tiff.Photometric.MinIsBlack;
tagstruct.BitsPerSample = 16;
tagstruct.SamplesPerPixel = 1;
tagstruct.PlanarConfiguration = Tiff.PlanarConfiguration.Chunky;
tagstruct.Software = ‘MATLAB’;
tagstruct.Compression = 1;
t = Tiff(path,’w’);
setTag(t,tagstruct);
write(t,imgdata);
I got the error message "SamplesPerPixel is 1, but the number of image planes provided was 150.", so write() interprets the third dimension as the samples per pixel, which is not what I want. Samples per Pixel needs to be 1, as I have grayscale images.
After that, I also tried it with the "append" option and a loop over the images (with the same tagstruct as above)
t = Tiff(path,’a’);
setTag(t,tagstruct);
numberOfImages = size(imgdata,3);
for n=1:numberOfImages
currentImage = squeeze(imgdata(:,:,n));
write(t,currentImage);
end
close(t);
It runs without errors and the file size of the uncompressed file is exactly what I would expect, so I think the data is in the file. But I can’t open the file in any other software than matlab. Irfanview, imageJ, Windows image viewer all show just the first image of the stack.
Any ideas what’s wrong? Thanks. Hi,
I would like to save a stack (in this case 150) of uint16 grayscale images to a single TIFF-file. First I tried pass over the 3D-array (the third dimension are the individual images) to imwrite, but it complained "Writing TIFFs with 150 components is not supported with IMWRITE. Use Tiff instead. ". I tried this (imgdata is my 3D-array of images):
imgdata = uint16(imgdata);
tagstruct.ImageLength = size(imgdata,1);
tagstruct.ImageWidth = size(imgdata,2);
tagstruct.Photometric = Tiff.Photometric.MinIsBlack;
tagstruct.BitsPerSample = 16;
tagstruct.SamplesPerPixel = 1;
tagstruct.PlanarConfiguration = Tiff.PlanarConfiguration.Chunky;
tagstruct.Software = ‘MATLAB’;
tagstruct.Compression = 1;
t = Tiff(path,’w’);
setTag(t,tagstruct);
write(t,imgdata);
I got the error message "SamplesPerPixel is 1, but the number of image planes provided was 150.", so write() interprets the third dimension as the samples per pixel, which is not what I want. Samples per Pixel needs to be 1, as I have grayscale images.
After that, I also tried it with the "append" option and a loop over the images (with the same tagstruct as above)
t = Tiff(path,’a’);
setTag(t,tagstruct);
numberOfImages = size(imgdata,3);
for n=1:numberOfImages
currentImage = squeeze(imgdata(:,:,n));
write(t,currentImage);
end
close(t);
It runs without errors and the file size of the uncompressed file is exactly what I would expect, so I think the data is in the file. But I can’t open the file in any other software than matlab. Irfanview, imageJ, Windows image viewer all show just the first image of the stack.
Any ideas what’s wrong? Thanks. tif, tiff, multipage tiff, imwrite MATLAB Answers — New Questions
Error using readtable: An error occurred while trying to determine whether “readData” is a function name
I get the following error when I am calling
readtable(‘file.csv’)
Error using readtable (line 197)
An error occurred while trying to determine whether "readData" is a function name.
Note: readtable detected the following parameters:
‘Delimiter’, ‘,’, ‘HeaderLines’, , ‘Format’, ”
Can you please help me on this one (do not provide me links on the same topic, I have checked everything and nothing is working) ?I get the following error when I am calling
readtable(‘file.csv’)
Error using readtable (line 197)
An error occurred while trying to determine whether "readData" is a function name.
Note: readtable detected the following parameters:
‘Delimiter’, ‘,’, ‘HeaderLines’, , ‘Format’, ”
Can you please help me on this one (do not provide me links on the same topic, I have checked everything and nothing is working) ? I get the following error when I am calling
readtable(‘file.csv’)
Error using readtable (line 197)
An error occurred while trying to determine whether "readData" is a function name.
Note: readtable detected the following parameters:
‘Delimiter’, ‘,’, ‘HeaderLines’, , ‘Format’, ”
Can you please help me on this one (do not provide me links on the same topic, I have checked everything and nothing is working) ? readtable MATLAB Answers — New Questions
Which UHD version is compatible for MATLAB 2023a
I have a computer which is not connected to internet and I have NI USRP 2954R, and both are connected via LAN cable. The computer is not connected to the internet. So, I can’t download the communications toolbox directly through MATLAB software. So, can anyone tell me which UHD(Which is to be downloaded from ettus website) version is compatible with MATLAB 2023b?I have a computer which is not connected to internet and I have NI USRP 2954R, and both are connected via LAN cable. The computer is not connected to the internet. So, I can’t download the communications toolbox directly through MATLAB software. So, can anyone tell me which UHD(Which is to be downloaded from ettus website) version is compatible with MATLAB 2023b? I have a computer which is not connected to internet and I have NI USRP 2954R, and both are connected via LAN cable. The computer is not connected to the internet. So, I can’t download the communications toolbox directly through MATLAB software. So, can anyone tell me which UHD(Which is to be downloaded from ettus website) version is compatible with MATLAB 2023b? ettus, matlab2023b, national instruments, usrp, uhd MATLAB Answers — New Questions
Remove exponentials with positive argument in symbolic MATLAB
Hello!
I am using symbolic MATLAB to obtain an expression of the form:
Where are some complicated expresions of other variables. To avoid problems with numeric evaluation, I would like to express the expression in the form:
Is there a way to easily implement that on MATLAB?
Thanks!Hello!
I am using symbolic MATLAB to obtain an expression of the form:
Where are some complicated expresions of other variables. To avoid problems with numeric evaluation, I would like to express the expression in the form:
Is there a way to easily implement that on MATLAB?
Thanks! Hello!
I am using symbolic MATLAB to obtain an expression of the form:
Where are some complicated expresions of other variables. To avoid problems with numeric evaluation, I would like to express the expression in the form:
Is there a way to easily implement that on MATLAB?
Thanks! exponential, simplification MATLAB Answers — New Questions
Security Baselines
Hi, I’m having an issue after enabling the baseline securities. When we connect our laptop to the docking station via the Thunderbolt port, the peripherals (mouse, keyboard, and network connection) get blocked.
We suspected the policy “Disable new DMA devices when this computer is locked,” but disabling it didn’t help.
Does any body have any idea, which policy it might be blocking the peripherals ? this is a headache to find.
Hi, I’m having an issue after enabling the baseline securities. When we connect our laptop to the docking station via the Thunderbolt port, the peripherals (mouse, keyboard, and network connection) get blocked. We suspected the policy “Disable new DMA devices when this computer is locked,” but disabling it didn’t help. Does any body have any idea, which policy it might be blocking the peripherals ? this is a headache to find. Read More